Solved by AfonsoSalgadoSousa in post #2 
              
              
                I found the answer in another thread, but cannot find it again. Basically, the nn.quantized.FloatFunctional() class should be initialized in the init function so that it is visible to the TorchScript inspector. 
This will not work: 
def forward(self, x):
   return nn.quantized.FloatFunctional().add(…