[Bug] sampling_id op 在编译时推断的shape不正确
Created by: zenghsh3
paddlepaddle-gpu==1.3.2.post97
from paddle import fluid
import numpy as np
x = fluid.layers.data(name='x', shape=[3], dtype='float32')
output = fluid.layers.sampling_id(x)
print('Compile shape: ', output.shape)
place = fluid.CPUPlace()
exe = fluid.Executor(place=place)
exe.run(fluid.default_startup_program())
feed = {'x': np.array([[0.2, 0.3, 0.5], [0.2, 0.3, 0.5]], dtype='float32')}
output_np = exe.run(feed=feed, fetch_list=[output])[0]
print('Runtime shape: ', output_np.shape)
Compile shape: (-1, 3)
Runtime shape: (2,)
Compile shape 应该是(-1),这个错误会影响后续网络的构建。