How to export a model that without forward() function

Just like title,if i got a “bone” of a neural network without any specific forward() function like:

def forward(x):
      raise NotImplementedError

Is that possible to export this model into ONNX or even TensorRT someway?

Without the forward implementation PyTorch wouldn’t know how the initialized modules and parameters should be used in the forward pass and I would assume the same applies to ONNX and TensorRT.