### New Issue Checklist - [ ] I have read the [Contribution Guidelines](https://github.com/tensorlayer/tensorlayer/blob/master/CONTRIBUTING.md) - [ ] I searched for [existing GitHub issues](https://github.com/tensorlayer/tensorlayer/issues) ### Issue Description 请问,tensorlayerx 目前支持 paddle 做后端,然后运行包含嵌套结构关系的网络模型吗?我运行 tlx 提供的 example 例子,发现 nested_usage_of_layer.py 这个文件以 tf 做后端可以运行,但改成 paddle 做后端,会提示报错,错误提示: ```python 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' ``` ### 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](https://github.com/tensorlayer/TensorLayerX/files/9775292/nested_usage_of_layer.txt) 自己在转换其它存在嵌套关系的网络模型时,如 resnet 时,发现以 paddle 做后端也可以成功运行,但是结果不准确,BatchNorm2d 这一层开始的输出就不再一样了。
Activity
Laicheng0830 commentedon Oct 13, 2022
这个报错是正常的,nested_usage_of_layer.py 的代码是混合TF运行的,其中用到了tf.GradientTape()。
Laicheng0830 commentedon Oct 13, 2022
qiutzh结果不准确能给个github仓链接吗,或者贴例子
qiutzh commentedon Jan 16, 2023
@Laicheng0830 忘记回复您了,抱歉,嵌套结构的网络定义tensorlayerx也是支持的~