pytorch tensorrt Warning: Encountered known unsupported method torch.Tensor.flatten

出现这种错误,首先找到模型的flatten算子,例如

x=x.flatten(start_dim=1),改为x=torch.flatten(x,start_dim=1)

你可能感兴趣的:(pytorch tensorrt Warning: Encountered known unsupported method torch.Tensor.flatten)