Hi,
I am trying to save a model using torch.jit.script in the following code:
    with torch.jit.optimized_execution(True):
    	traced_script_module = torch.jit.script(model)# save the converted model
    	traced_script_module.save("yolov3.pt")

But I got this error :
torch.jit.frontend.NotSupportedError: Compiled functions can't take variable number of arguments or use keyword-only arguments with defaults:
  File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 87
    def forward(self, *input):
                      ~~~~~~ <--- HERE
        r"""Defines the computation performed at every call.


The code of building the model can be found here:

  
      github.com
  
  
    eriklindernoren/PyTorch-YOLOv3/blob/master/models.py 14
from __future__ import division

import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np

from utils.parse_config import *
from utils.utils import build_targets, to_cpu, non_max_suppression

import matplotlib.pyplot as plt
import matplotlib.patches as patches


def create_modules(module_defs):
    """
    Constructs module list of layer blocks from module configuration in module_defs
    """
    hyperparams = module_defs.pop(0)


  This file has been truncated. show original

  
  
    
    
  
  


How can I solve this issue?