Text-GCN icon indicating copy to clipboard operation
Text-GCN copied to clipboard

AttributeError: 'int' object has no attribute 'numel'

Open Joey0538 opened this issue 4 years ago • 6 comments

When I run !python3 main.py, I get this error. Its Python 3.7 and all latest version of torch libraries in Google Colab. Won't this work with the latest versions? Is it must that I must use the versions specified in the used library version list? Please help me out.

Joey0538 avatar Mar 05 '21 15:03 Joey0538

Same. Is there a solution?

Eighonet avatar Apr 14 '21 08:04 Eighonet

Same. Is there a solution?

I suggest using the tensorflow implementation of the same. Follow this... https://github.com/yao8839836/text_gcn Easy to work with. Pytorch implementations have library compatibility issues.

Joey0538 avatar Apr 14 '21 08:04 Joey0538

same issue here, did you find a solution for this?

or just simply switch to TensorFlow implementation

whtitefall avatar Dec 03 '21 17:12 whtitefall

simply switch to TensorFlow implementation, Pytorch libraries got too many compatibility issues.

Joey0538 avatar Dec 04 '21 05:12 Joey0538

Did anybody find the solution? I would gladly try use the other options but unfortunately that one is implemented in TensorFlow 1 and therefore can't be exported to onnx for example.

mbaxamb3333 avatar May 25 '22 16:05 mbaxamb3333

First of all thanks to the author, I use the source code and it works fine after some modifications. Now the code can run normally on torch1.10.0 cuda 11.3, I put the relevant modifications on the gitee repository, the link is as follows : https://gitee.com/zrpNUDT/Text-GCN

RPZ97 avatar Jul 07 '22 12:07 RPZ97