deeppavlov/core/models/tf_model.py
def save(self, exclude_scopes: tuple = ('Optimizer',)) -> None:
        """Save model parameters to self.save_path"""
        if not hasattr(self, 'sess'):
            raise RuntimeError('Your TensorFlow model {} must'
                               ' have sess attribute!'.format(self.__class__.__name__))
        path = str(self.save_path.resolve())
        log.info('[saving model to {}]'.format(path))
        var_list = self._get_saveable_variables(exclude_scopes)
        saver = tf.train.Saver(var_list)
        saver.save(self.sess, path)
def save(self, exclude_scopes: tuple = ('Optimizer',)) -> None:
        """Save model parameters to self.save_path"""
        if not hasattr(self, 'sess'):
            raise RuntimeError('Your TensorFlow model {} must'
                               ' have sess attribute!'.format(self.__class__.__name__))
        path = str(self.save_path.resolve())
        log.info('[saving model to {}]'.format(path))
        var_list = self._get_saveable_variables(exclude_scopes)
        saver = tf.train.Saver(var_list)
        saver.save(self.sess, path)
def save ( self , exclude_scopes : tuple = ( 'Optimizer' , ) ) -> None : if not hasattr ( self , 'sess' ) : raise RuntimeError ( 'Your TensorFlow model {} must' ' have sess attribute!' . format ( self . __class__ . __name__ ) ) path = str ( self . save_path . resolve ( ) ) log . info ( '[saving model to {}]' . format ( path ) ) var_list = self . _get_saveable_variables ( exclude_scopes ) saver = tf . train . Saver ( var_list ) saver . save ( self . sess , path )
Save model parameters to self.save_path
Save model parameters to self . save_path