Open yashkumaratri opened 6 years ago
Hmmm several questions. What version of cuda do you have installed if any? Do you have the latest version of PyTorch installed?
I have cuda 8 installed I installed torch from http://pytorch.org/
and it installs torch-0.3.1 , but the repo docs says to install PyTorch 0.4.0 PyTorch says to run these 2 commands in terminal
pip3 install http://download.pytorch.org/whl/cu80/torch-0.3.1-cp35-cp35m-linux_x86_64.whl
pip3 install torchvision
As of now I've resetted my system and installed python 3.6.3, So should I install every packages latest version.
or you can tell me what version of what should I install, I just want to run the sentiment classifier only (just want to test the result over some sentences)
Hi, pytorch only has pre-built wheels for 0.3 currently. In order to get pytorch 0.4 you have to build from top of tree. Try following the instructions here to build pytorch 0.4 from source.
it also seems like you pip installed apex from pypi. Our version of apex (A PyTorch Extension) has a name conflict with an already existing apex package in pypi. While we work to resolve this please uninstall the current version of apex you have with pip uninstall -y apex
, and install our version with python ./setup.py install
.
Let me know if that works. Thanks for your patience.
Turns out cuda8.0 doesn't build properly. While we address this please try building from our latest commit. 046d09a5c3b186536bc8c0f33ad7abec00a8af1d
The code is running flawless , thanks for helping me out.
keeping this open until we get it working for both 8 and 9
Tried the new model (sst_8k.pt) and it is throwing errors
python3 generate.py --load_model sst_8k.pt --gen_length -1 --visualize --text "Happy testing"
Creating mlstm
Traceback (most recent call last):
File "generate.py", line 212, in
try 199c273c15e7d545c08c74ef20a7c0644fad9822
Added a simple conversion converting weight[0]
to float.
Didn't test all the way through though
Sorry for the late reply but the code still throws error
python3 generatenew.py --load_model sst_8k.pt --gen_length -1 --visualize --text "25 August 2003 League of Extraordinary Gentlemen: Sean Connery is one of
the all time greats I have been a fan of his since the 1950's."
Creating mlstm
generatenew.py:107: UserWarning: invalid index of a 0-dim tensor. This will be an error in PyTorch 0.5. Use tensor.item() to convert a 0-dim tensor to a Python number
neuron = neuron[0]
Traceback (most recent call last):
File "generatenew.py", line 202, in <module>
neuron, polarity = get_neuron_and_polarity(sd, args.neuron)
File "generatenew.py", line 108, in get_neuron_and_polarity
val = weight[0][neuron]
RuntimeError: take is not implemented for type torch.HalfTensor
line 108 : val = weight[0].float()[neuron]
Solved it
I tried following the docs for installing and running the program.
At first I tried
Next I tried
Later just to run the sentiment classifier i ran
So I tried changing the zope.interface versions and apex versions but it still throws error.
Tried to run with native python3 as well as conda3 but it doesn't work.
So anyone can give me an advice or just give me a version controlled list of requirements.txt, It'll be so helpful, Please guys :)