有动态图模式下可以使用的一维卷积和池化吗
Created by: liu0haha123
飞桨版本1.7.2 测试代码 import paddle.fluid as fluid with fluid.dygraph.guard(): x = fluid.layers.data(name='x', shape=[7, 1], append_batch_size=False, dtype='float32', lod_level=1)
avg_x = fluid.layers.sequence_pool(input=x, pool_type='average')
sum_x = fluid.layers.sequence_pool(input=x, pool_type='sum')
sqrt_x = fluid.layers.sequence_pool(input=x, pool_type='sqrt')
max_x = fluid.layers.sequence_pool(input=x, pool_type='max')
last_x = fluid.layers.sequence_pool(input=x, pool_type='last')
first_x = fluid.layers.sequence_pool(input=x, pool_type='first')
print(max_x)
报错信息:Traceback (most recent call last): File "E:/Paddle/test.py", line 5, in avg_x = fluid.layers.sequence_pool(input=x, pool_type='average') File "D:\Anaconda\envs\paddle\lib\site-packages\paddle\fluid\layers\sequence_lod.py", line 341, in sequence_pool "sequence layer is not supported in dygraph mode yet.") AssertionError: sequence layer is not supported in dygraph mode yet.
请问有在动态图模式下可以使用的一维卷积和池化吗 或者有什么利用现有的函数替代的方案