<gh_stars>0
# Convolution Neural Networks

# importing the required libraries
from demo import demo
from model import train_model, valid_model
import tensorflow as tf


flags =  tf.compat.v1.flags
flags.DEFINE_string('MODE', 'demo', 
                    'Set program to run in different modes, including train, valid and demo.')
flags.DEFINE_string('checkpoint_dir', './models', 
                    'Path to the model file.')
flags.DEFINE_string('train_data', '../data/fer2013/fer2013.csv',
                    'Path to the training data.')
flags.DEFINE_string('valid_data', '../data/fer2013/',
                    'Path to the training data.')
flags.DEFINE_boolean('show_box', True, 
                    'If true, the results will show detection box')
FLAGS = flags.FLAGS


def main():
  assert FLAGS.MODE in ('train', 'valid', 'demo')
  
  if FLAGS.MODE == 'demo':
    demo(FLAGS.checkpoint_dir, FLAGS.show_box)
  elif FLAGS.MODE == 'train':
    train_model(FLAGS.train_data)
  elif FLAGS.MODE == 'valid':
    valid_model(FLAGS.checkpoint_dir, FLAGS.valid_data)


if __name__ == '__main__':
  main()
# Convolution Neural Networks

# importing the required libraries
from demo import demo
from model import train_model, valid_model
import tensorflow as tf


flags =  tf.compat.v1.flags
flags.DEFINE_string('MODE', 'demo', 
                    'Set program to run in different modes, including train, valid and demo.')
flags.DEFINE_string('checkpoint_dir', './models', 
                    'Path to the model file.')
flags.DEFINE_string('train_data', '../data/fer2013/fer2013.csv',
                    'Path to the training data.')
flags.DEFINE_string('valid_data', '../data/fer2013/',
                    'Path to the training data.')
flags.DEFINE_boolean('show_box', True, 
                    'If true, the results will show detection box')
FLAGS = flags.FLAGS


def main():
  assert FLAGS.MODE in ('train', 'valid', 'demo')
  
  if FLAGS.MODE == 'demo':
    demo(FLAGS.checkpoint_dir, FLAGS.show_box)
  elif FLAGS.MODE == 'train':
    train_model(FLAGS.train_data)
  elif FLAGS.MODE == 'valid':
    valid_model(FLAGS.checkpoint_dir, FLAGS.valid_data)


if __name__ == '__main__':
  main()
# Convolution Neural Networks # importing the required libraries