tensorflow_tutorials/mnist/mnist.py
def train(self, train_data, session=None):
        """
        Train the model with the data and return the session.
        Will create a new session if not given.
        """
        if session is None:
            session = self.new_session()

        for _ in range(self._config['training']):
            batch_xs, batch_ys = train_data.next_batch(self._config['batches'])

            session.run(self.train_step, feed_dict={
                self.inputs: batch_xs,
                self.distribution: batch_ys
            })

        return session

        Train the model with the data and return the session.
        Will create a new session if not given.
        
Train the model with the data and return the session.
Will create a new session if not given.
Train the model with the data and return the session . Will create a new session if not given .
def train(self, train_data, session=None):
        if session is None:
            session = self.new_session()
        for _ in range(self._config['training']):
            batch_xs, batch_ys = train_data.next_batch(self._config['batches'])
            session.run(self.train_step, feed_dict={
                self.inputs: batch_xs,
                self.distribution: batch_ys
            })
        return session
def train ( self , train_data , session = None ) : if session is None : session = self . new_session ( ) for _ in range ( self . _config [ 'training' ] ) : batch_xs , batch_ys = train_data . next_batch ( self . _config [ 'batches' ] ) session . run ( self . train_step , feed_dict = { self . inputs : batch_xs , self . distribution : batch_ys } ) return session
Train the model with the data and return the session.
Train the model with the data and return the session .
"""
        Train the model with the data and return the session.
        Will create a new session if not given.
        """
self
train_data
session