facebookresearch / deepcluster

Deep Clustering for Unsupervised Learning of Visual Features
Other
1.69k stars 325 forks source link

AttributeError: 'NoneType' object has no attribute 'weight' #73

Closed hosea7456 closed 4 years ago

hosea7456 commented 4 years ago

Hi, I am trying to run the DeepClusterNet of your code. But I have some problems with it. When I run the train.py, it shows:

fd = int(model.top_layer.weight.size()[1])

AttributeError: 'NoneType' object has no attribute 'weight'

I couldn't found the imformation about 'model.top_layer.weight'. How can I figure it out? Thank you.

mathildecaron31 commented 4 years ago

Hi, thanks for your interest. Can you try printing the model (print(model)) just before you get the error ?

hosea7456 commented 4 years ago

Hi , mathildecaron31, sorry for the lat reply . There is some problem with the models I downloaded . I try (print (model )) , It's showing None . So I remove the model's folder and redownload it . Finaly I solved this issue , Thank you!