(self)
return weights_string
Return the weights of the neural network as a string.
Return the weights of the neural network as a string.
Return the weights of the neural network as a string .
def get_net_param(self):
        """ Return the weights of the neural network as a string. """
        f = tempfile.NamedTemporaryFile(mode='w+', delete=False)
        self.deploy_net.share_with(self.net)
        self.deploy_net.save(f.name)
        f.close()
        with open(f.name, 'rb') as temp_file:
            weights_string = temp_file.read()
        return weights_string
def get_net_param ( self ) : f = tempfile . NamedTemporaryFile ( mode = 'w+' , delete = False ) self . deploy_net . share_with ( self . net ) self . deploy_net . save ( f . name ) f . close ( ) with open ( f . name , 'rb' ) as temp_file : weights_string = temp_file . read ( ) return weights_string