a-PyTorch-Tutorial-to-Image-Captioning
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard
AttributeError: 'PackedSequence' object has no attribute 'log_softmax'
anyone solved it?
use (PackedSequence).data to return the tensor to be passed into the loss function.
@garyongguanjie
how to use (PackedSequence).data
?
in which file?
@uuzgu and @nyj-ocean do something like this:
179 scores = pack_padded_sequence(scores, decode_lengths, batch_first=True).data
180 targets = pack_padded_sequence(targets, decode_lengths, batch_first=True).data
Great! It's helps me. Thanks! @prraoo
@prraoo thanks! It helps me !