I use tf2.1 train the model,but it happens the error

Traceback (most recent call last):
File “D:/Learning/professional knowledge/DeepLearning-DGL/TensorFlow/DGI/train.py”, line 171, in
main()
File “D:/Learning/professional knowledge/DeepLearning-DGL/TensorFlow/DGI/train.py”, line 69, in main
loss = dgi(features)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py”, line 822, in call
outputs = self.call(cast_inputs, *args, **kwargs)
File “D:\Learning\professional knowledge\DeepLearning-DGL\TensorFlow\DGI\dgi.py”, line 54, in call
positive = self.encoder(features, corrupt=False)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py”, line 822, in call
outputs = self.call(cast_inputs, *args, **kwargs)
File “D:\Learning\professional knowledge\DeepLearning-DGL\TensorFlow\DGI\dgi.py”, line 27, in call
features = self.conv(features)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py”, line 822, in call
outputs = self.call(cast_inputs, *args, **kwargs)
File “D:\Learning\professional knowledge\DeepLearning-DGL\TensorFlow\DGI\gcn.py”, line 36, in call
h = layer(self.g, h)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py”, line 822, in call
outputs = self.call(cast_inputs, *args, **kwargs)
File “D:\Installer-software\ANACONDA\lib\site-packages\dgl\nn\tensorflow\conv\graphconv.py”, line 109, in call
in_degree = tf.clip_by_value(tf.cast(graph.in_degrees(), tf.float32), clip_value_min=1,
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\util\dispatch.py”, line 180, in wrapper
return target(*args, **kwargs)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\ops\math_ops.py”, line 705, in cast
x = ops.convert_to_tensor(x, name=“x”)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\framework\ops.py”, line 1314, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\framework\constant_op.py”, line 317, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\framework\constant_op.py”, line 258, in constant
allow_broadcast=True)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\framework\constant_op.py”, line 266, in _constant_impl
t = convert_to_eager_tensor(value, ctx, dtype)
File “D:\Installer-software\ANACONDA\lib\site-packages\tensorflow_core\python\framework\constant_op.py”, line 96, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Attempt to convert a value (tensor([1, 5, 1, …, 3, 1, 1])) with an unsupported type (<class ‘torch.Tensor’>) to a Tensor.

Hi,

Sorry for the inconvenience. However our Tensorflow on DGL currently doesn’t support Windows. (Due to a plugin called tfdlpack doesn’t support on Windows). You could try linux environment with Docker/WSL on Windows, or trying our Pytorch support on DGL. More information can be found at https://docs.dgl.ai/install/backend.html