You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 27, 2026. It is now read-only.
I want to implement mini-batching training on GMM as discussed in #7 . However, I am little bit confused by the code gmm.reset_parameters(torch.Tensor(fvectors[:500].astype(np.float32))). I am not sure whether it is related to my version of pycave, or maybe my understanding to the code in #7 is wrong. My code doesn't work.
My code are as follows:
from pycave.bayes.gmm import GaussianMixture as GM
from dataloader.gmm_dataset import gmm_dataset
train_gmm_dataset = gmm_dataset(data_path)
train_dataset_loader = torch.utils.data.DataLoader(dataset=train_gmm_dataset,
batch_size=train_dataloader_config["batch_size"],
shuffle=train_dataloader_config["shuffle"],
num_workers=train_dataloader_config["num_workers"])
for i, data in enumerate(train_dataset_loader): # data:[1, pt, 3]
data = torch.squeeze(data, 0)
gmm = GM(num_components=2, covariance_type="diag", init_strategy="kmeans")
gmm.model_.reset_parameters(data)
history = gmm.fit(train_dataset_loader)
Hi,
I want to implement mini-batching training on GMM as discussed in #7 . However, I am little bit confused by the code
gmm.reset_parameters(torch.Tensor(fvectors[:500].astype(np.float32))). I am not sure whether it is related to my version of pycave, or maybe my understanding to the code in #7 is wrong. My code doesn't work.My code are as follows:
And the error is:
Thank you so much!
Best regards,
Daisy