def demo1(sess):
 filenames = tf.gfile.ListDirectory(FLAGS.train_dir)
 filenames = sorted(filenames)
 filenames = [os.path.join(FLAGS.train_dir, f) for f in filenames if (f[(-4):] == '.png')]
 assert (len(filenames) >= 1)
 fps = 30
 print 'Producing video file...'
 filename = os.path.join(FLAGS.train_dir, 'demo1.mp4')
 clip = mpe.ImageSequenceClip(filenames, fps=fps)
 clip.write_videofile(filename)
 print 'Done!'

def demo1 ( sess ) : filenames = tf . gfile . ListDirectory ( FLAGS . train_dir ) filenames = sorted ( filenames ) filenames = [ os . path . join ( FLAGS . train_dir , f ) for f in filenames if ( f [ ( - 4 ) : ] == '.png' ) ] assert ( len ( filenames ) >= 1 ) fps = 30 print 'Producing video file...' filename = os . path . join ( FLAGS . train_dir , 'demo1.mp4' ) clip = mpe . ImageSequenceClip ( filenames , fps = fps ) clip . write_videofile ( filename ) print 'Done!'
demo based on images dumped during training .