Open OpenAI-chn opened 2 years ago
I have meet the same problem today, and it may caused by a MaxPool2d operation with argument _returnindices=True, because when requires indices, MaxPool2d will return a tuple, rather than a Tensor when _returnindices=False. 这可能是因为你将MaxPool2d的参数return_indices设置为了True,此时MaxPool2d返回的是一个包含池化结果和下标的元组。
AttributeError: 'tuple' object has no attribute 'size'