Hi! Thank you for your response! I have submitted an issue on PyTorch but I am not able to add a label. The name is DataParallel to ONNX.
For the code snippet, I think this is a similar example to mine! I tried to use something like net.ls.module in your code snippet, but it does not work and it gives me the following error message:

File “/home/qi/mlagents_gesthor/ml-agents/mlagents/trainers/torch/model_serialization.py”, line 119, in export_policy_model
self.policy.actor_critic.module,
File “/home/qi/gesthor/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 778, in getattr
raise ModuleAttributeError("’{}’ object has no attribute ‘{}’".format(
torch.nn.modules.module.ModuleAttributeError: ‘SeparateActorCritic’ object has no attribute ‘module’

where SeparateActorCritic is similar to net in your code snippet.