The model is actually the weights.!
You need to load the weights inside an existing network.
I don’t see any code where u create a network and then load the weights into it.
For example, you need to something like this.!
weights = torch.load("Paramecium.pth", map_location = torch.device(‘cpu’))
model = core.Model([‘Paramecium’, ‘Noise’])
model.load_state_dict(weights)
torch.onnx.export(model, dummy_input, "*.onnx")

You are actually missing the model.load_state_dict()
The Paramecium.pth just contains the weights, so you need to load these weights inside a model core.Model([‘Paramecium’, ‘Noise’])