Torchscript Dict problems

Hello guys,

I have the following problem. I want to convert my model with torchscript, but it throw a convert error.

This attribute exists on the Python module, but we failed to convert Python type: 'dict' to a TorchScript type. Cannot infer concrete type of torch.nn.Module. Its type was inferred; try adding a type annotation for the attribute.):

I have a dictonary e2c = {} and this dictonary will be used like this for example:

e2c["5"] = Cube2Equirec(512, 1024, 2)

later it should be called like this in the forward method:

equi = c2e["5"](cube)

How i program it right that it can be converted by torchscript?