yangxuntu/SGAE

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

zyactive opened this issue · 0 comments

when i try to evaluate the model ,this issue showed ,i have no idea on how to solve it.
Any replay will be helpful, thanks so much.

Traceback (most recent call last):
File "eval_mem.py", line 208, in
vars(opt))
File "/media/zy/myp/deaplearning/image-caption/SGAE/SGAE-master/eval_utils_mem.py", line 235, in eval_split
ssg_data,use_rela, training_mode, opt=tmp_eval_kwargs, mode='sample')#[0].data
File "/home/zy/anaconda3/envs/neuralbabytalk/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/media/zy/myp/deaplearning/image-caption/SGAE/SGAE-master/models/CaptionModel_mem.py", line 31, in forward
return getattr(self, '_'+mode)(*args, **kwargs)
File "/media/zy/myp/deaplearning/image-caption/SGAE/SGAE-master/models/AttModel_mem4.py", line 722, in _sample
ssg_data = self.ssg_graph_gfc(ssg_data)
File "/media/zy/myp/deaplearning/image-caption/SGAE/SGAE-master/models/AttModel_mem4.py", line 393, in ssg_graph_gfc
ssg_obj_feats = torch.zeros([ssg_obj.size()[0], ssg_obj.size()[1], self.rnn_size]).cuda()
AttributeError: 'NoneType' object has no attribute 'size'