sksq96 / pytorch-summary

Model summary in PyTorch similar to `model.summary()` in Keras
MIT License
4.01k stars 412 forks source link

'PackedSequence' problem when there's RNN module in the model #128

Closed leitro closed 4 years ago

leitro commented 4 years ago

Hi! I'm using pytorch 1.4 and there occurs an error that:

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

I think it is because of the RNN module in my model, do you guys know which part I need to modify in the source code to make it work? Cheers!

TylerYep commented 4 years ago

Try #124 and see if that works? Otherwise you can submit an issue on my fork and I can look at it more closely.

leitro commented 4 years ago

Try #124 and see if that works? Otherwise you can submit an issue on my fork and I can look at it more closely.

Cheers man!! It works:-) I'll close this issue and for sure recommend this repo for guys who are also working on RNN stuff.