Skip to content

AttributeError: 'ClusterNet' object has no attribute 'model' #54

Description

@Huiyu-Li

I try to pre-train the model on MINIST dataset, but I got the AttributeError: 'ClusterNet' object has no attribute 'model' . It seems that the ClusterNet model fails to call the def init_cluster() to initialize the self.model = ClusterNetTrainer(). Below is the traceback of the error. Could you help me to fix this?

Epoch 0: 0%| | 0/548 [00:00<?, ?it/s]
========== Start pretraining ==========
Epoch 0: 70%|██▊ | 384/548 [09:47<04:10, 1.53s/it, loss=2.49e+04, v_num=] Epoch 1: 28%|███ | 153/548 [01:59<05:08, 1.28it/s, loss=2.23e+04, v_num=] Epoch 2: 65%|████▌ | 354/548 [09:07<04:59, 1.55s/it, loss=1.95e+04, v_num=]
Epoch 2: 100%|████████████| 548/548 [12:13<00:00, 1.34s/it, loss=1.88e+04, v_num=]
Traceback (most recent call last):
File "/home/huili/Projects/DeepDPM_Original/DeepDPM_alternations.py", line 236, in
train_clusternet_with_alternations()
File "/home/huili/Projects/DeepDPM_Original/DeepDPM_alternations.py", line 208, in train_clusternet_with_alternations
DeepDPM = model.clustering.model.cluster_model
AttributeError: 'ClusterNet' object has no attribute 'model'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions