h3lio5 / episodic-lifelong-learning

Implementation of "Episodic Memory in Lifelong Language Learning"(NeurIPS 2019) in Pytorch
MIT License
56 stars 8 forks source link

AttributeError: 'generator' object has no attribute 'clone' #3

Open stellaho opened 3 years ago

stellaho commented 3 years ago

Hi,

I am trying to run this model. While at the inference stage, I received the following AttributeError:

Traceback (most recent call last):
  File "main.py", line 273, in <module>
    model = MbPAplusplus(model_state=model_state)
  File "/home/sandstone/code/continual_learning/replay_baselines/episodic-lifelong-learning-master/models/MbPAplusplus.py", line 118, in __init__
    self.base_weights = self.classifier.parameters().clone().detach().to("cuda" if torch.cuda.is_available() else "cpu")
AttributeError: 'generator' object has no attribute 'clone'

I am wondering if anyone has the same issue like this. Or, any thoughts?

Thank you!

Pzeyang commented 2 years ago

AttributeError: 'generator' object has no attribute 'clone' I got the same problem.