Hi,
I am trying to convert a ConvLSTM PyTorch 3 network to onnx and I am encountering a RuntimeError: Error(s) in loading state_dict for ConvLSTM:	Missing key(s) in state_dict: error during the conversion. I have searched online 1 for a possible solution to no avail. Below is the code to convert the model
state_dict = torch.load('model.pth', map_location='cpu')

from collections import OrderedDict

new_state_dict = OrderedDict()

for k, v in state_dict.items():

    name = k[7:] # remove module.

new_state_dict[name] = v

model= ConvLSTM(input_size = (4, 8), input_dim = 3, hidden_dim = [64, 64, 128], kernel_size = (3, 3), num_layers = 3, batch_first = True)

model.load_state_dict(new_state_dict)

# define batch_size, channels, height, width for input placeholder

b, c, h, w = 1, 3, 4, 8

T = 6

x = Variable(torch.rand(T, b, c, h, w))

torch.onnx.export(model, x, 'model.onnx')

How do I resolve the error?
FYI, the full error message is
RuntimeError: Error(s) in loading state_dict for ConvLSTM:
	Missing key(s) in state_dict: "cell_list.0.conv.weight", "cell_list.0.conv.bias", "cell_list.1.conv.weight", "cell_list.1.conv.bias", "cell_list.2.conv.weight", "cell_list.2.conv.bias". 
	Unexpected key(s) in state_dict: "nv.bias".