ONNX模型转换至PaddlePaddle,op不支持onehot和LSTM
Created by: Lggggggx
您好,请问现在X2Paddle是暂时不支持onehot和LSTM操作吗? 例如torch中的gather用到了onehot操作
class test(torch.nn.Module):
def forward(self, batch_input, batch_slice):
'''batch_input:(batch_size, time_step, hidden_dim)
batch_slice:(batch_size, 2)
'''
shape_input = batch_input.size()
batch_slice = batch_slice.long().unsqueeze(2).expand(-1, -1, shape_input[2])
tensor_slice = torch.gather(batch_input, 1, batch_slice)
return tensor_slice