Solved by anujd9 in post #3 
              
              
                Hi. I don’t know if you have a custom densenet model but assuming that you are using a pre-trained model from torchvision library, then you can use the following steps for running your model in the browser: 

Using ONNX/ONNX JS:

import torch
import torch.onnx
import torchvision.models as models

# …