Open purohitsumit opened 6 years ago
Hi Sumit,
Very likely you are not using python3. “@“ is only introduced in python3 as matrix multiplication.
Best, Jiaxuan
Original Message Sender:Sumit Purohitnotifications@github.com Recipient:snap-stanford/GraphRNNGraphRNN@noreply.github.com Cc:Jiaxuan229331845@qq.com; Mentionmention@noreply.github.com Date:Sunday, Jul 1, 2018 23:07 Subject:[snap-stanford/GraphRNN] Unable to run the test program (#1)
Hi @JiaxuanYou , I tried to run this code but got following error: python main.py Traceback (most recent call last): ........... from utils import * File "/Users/puro755/OneDrive - PNNL/PhD/GraphGeneration/GraphRNN/utils.py", line 13, in module import community ImportError: No module named community I solved this using following commands: pip install --upgrade --force-reinstall python-louvain and pip install community I suggest to add community module to the requirement file. But even after this fix, i am unable to run the program. i get following error: ........ File "/Users/puro755/OneDrive - PNNL/PhD/GraphGeneration/GraphRNN/model.py", line 988 prob = x_prev @ x_last.permute(0,2,1) ^ SyntaxError: invalid syntax Do you have any suggestion to fix this error ? i am using Mac 10.12.6 and Python 2.7.13 :: Anaconda custom (x86_64) Thanks Sumit — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks for the pointer. That error is fixed using python3.
Next i get an error related to CUDA.FloatTensor
On my Mac i have set
export NO_CUDA=1
but i still get following error.
python3 main.py
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.5
return f(*args, **kwds)
CUDA 1
File name prefix GraphRNN_RNN_grid_4_128_
graph_validate_len 199.5
graph_test_len 215.0
total graph num: 100, training set: 80
max number node: 361
max/min number edge: 684; 180
max previous node: 40
train and test graphs saved at: ./graphs/GraphRNN_RNN_grid_4_128_test_0.dat
/XXXX/GraphGeneration/GraphRNN/model.py:299: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
nn.init.xavier_uniform(param,gain=nn.init.calculate_gain('sigmoid'))
..........
File "main.py", line 128, in <module>
has_output=True, output_size=args.hidden_size_rnn_output).cuda()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 249, in cuda
return self._apply(lambda t: t.cuda(device))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 176, in _apply
module._apply(fn)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 182, in _apply
param.data = fn(param.data)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 249, in <lambda>
return self._apply(lambda t: t.cuda(device))
RuntimeError: torch.cuda.FloatTensor is not enabled.```
Any idea ? Thanks
seems that you are not properly installing pytorch cuda version. ' torch.cuda.FloatTensor is not enabled'
Original Message Sender:Sumit Purohitnotifications@github.com Recipient:snap-stanford/GraphRNNGraphRNN@noreply.github.com Cc:Jiaxuan229331845@qq.com; Mentionmention@noreply.github.com Date:Monday, Jul 2, 2018 14:55 Subject:Re: [snap-stanford/GraphRNN] Unable to run the test program (#1)
Thanks for the pointer. That error is fixed using python3. Next i get an error related to CUDA.FloatTensor On my Mac i have set export NO_CUDA=1 but i still get following error. python3 main.py /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: compiletime version 3.6 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.5 return f(*args, **kwds) CUDA 1 File name prefix GraphRNN_RNN_grid_4128 graph_validate_len 199.5 graph_test_len 215.0 total graph num: 100, training set: 80 max number node: 361 max/min number edge: 684; 180 max previous node: 40 train and test graphs saved at: ./graphs/GraphRNN_RNN_grid_4_128_test_0.dat /XXXX/GraphGeneration/GraphRNN/model.py:299: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavieruniform. nn.init.xavier_uniform(param,gain=nn.init.calculate_gain('sigmoid')) .......... File "main.py", line 128, in module has_output=True, output_size=args.hidden_size_rnn_output).cuda() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 249, in cuda return self._apply(lambda t: t.cuda(device)) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 176, in _apply module._apply(fn) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 182, in _apply param.data = fn(param.data) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/torch/nn/modules/module.py", line 249, in lambda return self._apply(lambda t: t.cuda(device)) RuntimeError: torch.cuda.FloatTensor is not enabled.``` Any idea ? Thanks — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @JiaxuanYou , I tried to run this code but got following error:
python main.py Traceback (most recent call last): ........... from utils import * File "/XXXX/GraphGeneration/GraphRNN/utils.py", line 13, in <module> import community ImportError: No module named community
I solved this using following commands:
pip install --upgrade --force-reinstall python-louvain
andpip install community
I suggest to add community module to the requirement file.But even after this fix, i am unable to run the program. i get following error:
........ File "XXX/GraphGeneration/GraphRNN/model.py", line 988 prob = x_prev @ x_last.permute(0,2,1) ^ SyntaxError: invalid syntax
Do you have any suggestion to fix this error ? i am using Mac 10.12.6 and Python 2.7.13 :: Anaconda custom (x86_64)
Thanks Sumit