make the neural network marshalable