ildoonet / tf-lcnn

Tensorflow implementation for 'LCNN: Lookup-based Convolutional Neural Network'. Predict Faster using Models Trained Fast with Multi-GPUs
GNU General Public License v3.0
40 stars 10 forks source link

Training with train.py #2

Open amcinto opened 6 years ago

amcinto commented 6 years ago

Hello, I have been working with the train.py and trying to reproduce some of the results that you have had. I had some questions though.

  1. First I wanted to know how long it took to run train.py? I ask because I realized that it trains on ImageNet and MNIST which will take a long time. However, even modifying the code to run only MNIST it still takes a while.
  2. I did run into several errors but I my question was whether or not the train.py is meant to run on CPU or GPU? The title advertises CPU and the results for inference say GPU but no specifics for train.py. I justed wanted to match the results shown but I don't think that it's possible since your results are GPU based.
  3. I was also wondering if in the data_feeder.py was the "lcnntest" supposed to be "lcnnfast"?

    if __name__ == '__main__': parser = argparse.ArgumentParser(description='Tensorflow Training using LCNN.') parser.add_argument('--conf', default='./confs/alexnet.yaml', help='configuration file path') parser.add_argument('--model-conf', default='lcnntest', help='lcnnbest, lcnn0.9, normal') parser.add_argument('--dataset', default='mnist224', help='mnist, mnist224, ilsvrc2012') parser.add_argument('--conv', default='lcnn', help='lcnn, conv') parser.add_argument('--path-ilsvrc2012', default='/data/public/ro/dataset/images/imagenet/ILSVRC/2012/object_localization/ILSVRC/') parser.add_argument('--logpath', default=LOG_DIR) parser.add_argument('--restore', type=str, default='')

Sorry for the many questions but I was having trouble and would appreciate any help!

ildoonet commented 6 years ago
  1. As I remember, on MNIST it will take few hours, but much more on Imagenet. (few days?)

  2. Training should be run on GPU if you want it to run fast.

  3. That's just an argument, but you're suggestion makes sense. I will change that.

amcinto commented 6 years ago

I run the command python train.py --dataset=mnist224 --model-conf=lcnnfast and the learning starts but there is a display of everything within the conf/alexnet.yaml file. I'm not sure why its doing that because unless I comment parts out the epochs still display top 1% and top 5% accuracy. Which it shouldn't in my opinion. Why is that?