tffm/core.py
def build_graph(self):
        """Build computational graph according to params."""
        assert self.n_features is not None, 'Number of features is unknown. It can be set explicitly by .core.set_num_features'
        self.graph = tf.Graph()
        self.graph.seed = self.seed
        with self.graph.as_default():
            with tf.name_scope('learnable_params') as scope:
                self.init_learnable_params()
            with tf.name_scope('input_block') as scope:
                self.init_placeholders()
            with tf.name_scope('main_block') as scope:
                self.init_main_block()
            with tf.name_scope('optimization_criterion') as scope:
                self.init_regularization()
                self.init_loss()
                self.init_target()
            self.trainer = self.optimizer.minimize(self.checked_target)
            self.init_all_vars = tf.global_variables_initializer()
            self.summary_op = tf.summary.merge_all()
            self.saver = tf.train.Saver()
Build computational graph according to params.
Build computational graph according to params.
Build computational graph according to params .
def build_graph(self):
        assert self.n_features is not None, 'Number of features is unknown. It can be set explicitly by .core.set_num_features'
        self.graph = tf.Graph()
        self.graph.seed = self.seed
        with self.graph.as_default():
            with tf.name_scope('learnable_params') as scope:
                self.init_learnable_params()
            with tf.name_scope('input_block') as scope:
                self.init_placeholders()
            with tf.name_scope('main_block') as scope:
                self.init_main_block()
            with tf.name_scope('optimization_criterion') as scope:
                self.init_regularization()
                self.init_loss()
                self.init_target()
            self.trainer = self.optimizer.minimize(self.checked_target)
            self.init_all_vars = tf.global_variables_initializer()
            self.summary_op = tf.summary.merge_all()
            self.saver = tf.train.Saver()
def build_graph ( self ) : assert self . n_features is not None , 'Number of features is unknown. It can be set explicitly by .core.set_num_features' self . graph = tf . Graph ( ) self . graph . seed = self . seed with self . graph . as_default ( ) : with tf . name_scope ( 'learnable_params' ) as scope : self . init_learnable_params ( ) with tf . name_scope ( 'input_block' ) as scope : self . init_placeholders ( ) with tf . name_scope ( 'main_block' ) as scope : self . init_main_block ( ) with tf . name_scope ( 'optimization_criterion' ) as scope : self . init_regularization ( ) self . init_loss ( ) self . init_target ( ) self . trainer = self . optimizer . minimize ( self . checked_target ) self . init_all_vars = tf . global_variables_initializer ( ) self . summary_op = tf . summary . merge_all ( ) self . saver = tf . train . Saver ( )
Build computational graph according to params.
Build computational graph according to params .
"""Build computational graph according to params."""
self