tfplot/test_util.py
def _execute_plot_op(self, op, print_image=True, feed_dict={}):
        '''
        Execute the op, and get the result (e.g. ndarray) under a test session
        '''
        with self.cached_session() as sess:
            cprint("\n >>> " + str(op), color='cyan')
            self.assertIsInstance(op, tf.Tensor)
            ret = sess.run(op, feed_dict=feed_dict)
            if print_image and sys.platform == 'darwin':
                print(' ', end='')
                sys.stdout.flush()
                imgcat(ret)
                print('SHA1: ' + hash_image(ret))
            return ret

        Execute the op, and get the result (e.g. ndarray) under a test session
        
Execute the op, and get the result  under a test session
Execute the op and get the result under a test session
def _execute_plot_op(self, op, print_image=True, feed_dict={}):
        with self.cached_session() as sess:
            cprint("\n >>> " + str(op), color='cyan')
            self.assertIsInstance(op, tf.Tensor)
            ret = sess.run(op, feed_dict=feed_dict)
            if print_image and sys.platform == 'darwin':
                print(' ', end='')
                sys.stdout.flush()
                imgcat(ret)
                print('SHA1: ' + hash_image(ret))
            return ret
def _execute_plot_op ( self , op , print_image = True , feed_dict = { } ) : with self . cached_session ( ) as sess : cprint ( "\n >>> " + str ( op ) , color = 'cyan' ) self . assertIsInstance ( op , tf . Tensor ) ret = sess . run ( op , feed_dict = feed_dict ) if print_image and sys . platform == 'darwin' : print ( ' ' , end = '' ) sys . stdout . flush ( ) imgcat ( ret ) print ( 'SHA1: ' + hash_image ( ret ) ) return ret
Execute the op, and get the result (e.g.
Execute the op and get the result ( e . g .
'''
        Execute the op, and get the result (e.g. ndarray) under a test session
        '''
self
op
print_image
feed_dict