Closed CookieLau closed 5 years ago
Thanks!
You could also modify in the file matching_networks.py
:
replace all .data[0]
to .data.item()
And comments on
if self.fce:
outputs = self.lstm(output)
PS: The outputs
is not used in the code anyway right?
Since the update of Pytorch has changed its API for some functions, thus the version >= 0.4.0 is not compatible with this code. You need to create a new conda environment with python3 and Pytorch 0.3.1 to run.
Otherwise, you will find it stack with problem:"TypeError iteration over a 0-d tensor"![2019-07-28-15-41-54](https://user-images.githubusercontent.com/30521971/62004506-a382af80-b158-11e9-9ed4-685e7079471d.png)
That's all.