VoVAllen / tf-dlpack

DLPack for Tensorflow
Apache License 2.0
36 stars 4 forks source link

'Tensor' object has no attribute 'numpy' #17

Closed hadoop2xu closed 4 years ago

hadoop2xu commented 4 years ago

请问大佬 ,使用tfdlpack.to_dlpack(t)报错: File "/usr/local/lib/python3.6/dist-packages/tfdlpack/core.py", line 28, in to_dlpack cap = to_capsule(_to_dlpack_address(tf_tensor)) File "/usr/local/lib/python3.6/dist-packages/tfdlpack/capsule_api.py", line 35, in to_capsule add = int(ad_tensor.numpy()) AttributeError: 'Tensor' object has no attribute 'numpy' 可能是什么原因啊?

VoVAllen commented 4 years ago

Hi,

If you installed the nightly version of dgl, with tf>=2.2, this could be solved