We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问,tensorlayerx 目前支持 paddle 做后端,然后运行包含嵌套结构关系的网络模型吗?我运行 tlx 提供的 example 例子,发现 nested_usage_of_layer.py 这个文件以 tf 做后端可以运行,但改成 paddle 做后端,会提示报错,错误提示:
Traceback (most recent call last): File "D:/ProjectByPython/code/reference/DL_Platform/TensorLayer/TensorLayerX-0.5.6/examples/basic_tutorials/nested_usage_of_layer.py", line 159, in <module> grad = tape.gradient(_loss_ce, train_weights) File "D:\Software\miniconda3\envs\py37env_tlx\lib\site-packages\tensorflow_core\python\eager\backprop.py", line 984, in gradient if not t.dtype.is_floating: AttributeError: 'paddle.fluid.core_avx.VarType' object has no attribute 'is_floating'
python: 3.7 paddlepaddle version: 2.3.0 tensorlayerx version: 0.5.6
代码就是例子中的 nested_usage_of_layer.py 这个文件。 nested_usage_of_layer.txt
自己在转换其它存在嵌套关系的网络模型时,如 resnet 时,发现以 paddle 做后端也可以成功运行,但是结果不准确,BatchNorm2d 这一层开始的输出就不再一样了。
The text was updated successfully, but these errors were encountered:
这个报错是正常的,nested_usage_of_layer.py 的代码是混合TF运行的,其中用到了tf.GradientTape()。
Sorry, something went wrong.
qiutzh结果不准确能给个github仓链接吗,或者贴例子
@Laicheng0830 忘记回复您了,抱歉,嵌套结构的网络定义tensorlayerx也是支持的~
No branches or pull requests
New Issue Checklist
Issue Description
请问,tensorlayerx 目前支持 paddle 做后端,然后运行包含嵌套结构关系的网络模型吗?我运行 tlx 提供的 example 例子,发现 nested_usage_of_layer.py 这个文件以 tf 做后端可以运行,但改成 paddle 做后端,会提示报错,错误提示:
Reproducible Code
python: 3.7
paddlepaddle version: 2.3.0
tensorlayerx version: 0.5.6
代码就是例子中的 nested_usage_of_layer.py 这个文件。
nested_usage_of_layer.txt
自己在转换其它存在嵌套关系的网络模型时,如 resnet 时,发现以 paddle 做后端也可以成功运行,但是结果不准确,BatchNorm2d 这一层开始的输出就不再一样了。
The text was updated successfully, but these errors were encountered: