Export Torchscript module and call other than forward

Hi, I have an exported torch script module that looks loosely like:

class Model(torch.nn.Module):
    def forward(self, tensor):
        // do forward pass

    def reinitialize_hidden_buffers(self, tensor):
        // reinitializes model parameters

When I load the torchscript module in Python, I can call reinitialize_hidden_buffers, but when the model is exported and loaded into objective c (for deployment on iOS), I get
no member named 'reinitialize_hidden_buffers' in 'torch::jit::script::Module
Is there a way to call this correctly? Or should I just put control flow logic in the forward pass to do it.

This ended up being really straightforward.

torch::autograd::AutoGradMode guard(false);
at::AutoNonVariableTypeMode non_var_type_mode(true);