AttributeError: 'list' object has no attribute 'asnumpy'
lylyjy opened this issue · 3 comments
How to solve it?
Traceback (most recent call last):
File "main_4n0_3layer_12T_res.py", line 27, in
net = construct_model(config)
File "/mnt/d/try/STFGNN-master/utils_4n0_3layer_12T_res.py", line 41, in construct_model
adj = mx.sym.Variable('adj', shape=adj_mx.shape,
File "/home/lyl/miniconda3/lib/python3.8/site-packages/mxnet/symbol/symbol.py", line 2970, in var
init = init.dumps()
File "/home/lyl/miniconda3/lib/python3.8/site-packages/mxnet/initializer.py", line 477, in dumps
self._kwargs['value'] = val.tolist() if isinstance(val, np.ndarray) else val.asnumpy().tolist()
AttributeError: 'list' object has no attribute 'asnumpy'
Thanks.
I got the same error when running the demo, and got another error when I try to convert the "list" type to numpy. So sad.
I got the same error when running the demo, and got another error when I try to convert the "list" type to numpy. So sad.
Sorry for late reply. I met same issue before, seems like it is caused by MXNet version.
My environment is: python 3.7, MXNet 1.5.1, CUDA Version: 11.1
Is it MXNet cu100 1.5.1?