codeKgu / Text-GCN

A PyTorch implementation of "Graph Convolutional Networks for Text Classification." (AAAI 2019)
MIT License
123 stars 25 forks source link

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

Open Joey0538 opened 3 years ago

Joey0538 commented 3 years ago

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.

Eighonet commented 3 years ago

Same. Is there a solution?

Joey0538 commented 3 years ago

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.

whtitefall commented 2 years ago

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

or just simply switch to TensorFlow implementation

Joey0538 commented 2 years ago

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

mbaxamb3333 commented 2 years ago

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.

RPZ97 commented 2 years ago

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