Closed wingz1 closed 7 years ago
Any ideas? (python 3.6/TF1.3)
$ dytb_train --model LeNet --dataset MNIST ...loads data Args: { 'batch_size': 128, 'checkpoint_path': '', 'comment': '', 'dataset': 'MNIST', 'epochs': 150, 'exclude_scopes': [], 'l2_penalty': 0.0, 'lr_decay': False, 'lr_decay_epochs': 25, 'lr_decay_factor': 0.1, 'model': 'LeNet', 'optimizer': 'MomentumOptimizer', 'optimizer_args': {'learning_rate': 0.01, 'momentum': 0.9}, 'restart': False, 'train_device': '/gpu:0', 'trainable_scopes': []} <tf.Variable 'LeNet/conv1/W:0' shape=(5, 5, 1, 32) dtype=float32_ref> <tf.Variable 'LeNet/conv1/b:0' shape=(32,) dtype=float32_ref> <tf.Variable 'LeNet/conv2/W:0' shape=(5, 5, 32, 64) dtype=float32_ref> <tf.Variable 'LeNet/conv2/b:0' shape=(64,) dtype=float32_ref> <tf.Variable 'LeNet/fc1/W:0' shape=(3136, 1024) dtype=float32_ref> <tf.Variable 'LeNet/fc1/b:0' shape=(1024,) dtype=float32_ref> <tf.Variable 'LeNet/softmax_linear/W:0' shape=(1024, 10) dtype=float32_ref> <tf.Variable 'LeNet/softmax_linear/b:0' shape=(10,) dtype=float32_ref> Model LeNet: trainable parameters: 3274634. Size: 13098.536 KB Traceback (most recent call last): File "...anaconda3/bin/dytb_train", line 66, in sys.exit(main()) File "...anaconda3/bin/dytb_train", line 56, in main comment=ARGS.comment) File "...tensorflow_tools/dtb/dytb/train.py", line 217, in train return Trainer(model, dataset, args, steps, paths).train() File "...tensorflow_tools/dtb/dytb/trainer/Trainer.py", line 112, in train var_list=variables_to_train(self._args["trainable_scopes"])) File "...anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 315, in minimize grad_loss=grad_loss) File "...anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 380, in compute_gradients raise ValueError("No variables to optimize.") ValueError: No variables to optimize.
Hi @wingz1, it was my fault. Fixed!
Just upgrade dytb with pip install --upgrade dytb and you'll be fine
pip install --upgrade dytb
Yes, that worked, thanks!
Any ideas? (python 3.6/TF1.3)
$ dytb_train --model LeNet --dataset MNIST ...loads data Args: { 'batch_size': 128, 'checkpoint_path': '', 'comment': '', 'dataset': 'MNIST', 'epochs': 150, 'exclude_scopes': [], 'l2_penalty': 0.0, 'lr_decay': False, 'lr_decay_epochs': 25, 'lr_decay_factor': 0.1, 'model': 'LeNet', 'optimizer': 'MomentumOptimizer', 'optimizer_args': {'learning_rate': 0.01, 'momentum': 0.9}, 'restart': False, 'train_device': '/gpu:0', 'trainable_scopes': []} <tf.Variable 'LeNet/conv1/W:0' shape=(5, 5, 1, 32) dtype=float32_ref> <tf.Variable 'LeNet/conv1/b:0' shape=(32,) dtype=float32_ref> <tf.Variable 'LeNet/conv2/W:0' shape=(5, 5, 32, 64) dtype=float32_ref> <tf.Variable 'LeNet/conv2/b:0' shape=(64,) dtype=float32_ref> <tf.Variable 'LeNet/fc1/W:0' shape=(3136, 1024) dtype=float32_ref> <tf.Variable 'LeNet/fc1/b:0' shape=(1024,) dtype=float32_ref> <tf.Variable 'LeNet/softmax_linear/W:0' shape=(1024, 10) dtype=float32_ref> <tf.Variable 'LeNet/softmax_linear/b:0' shape=(10,) dtype=float32_ref> Model LeNet: trainable parameters: 3274634. Size: 13098.536 KB Traceback (most recent call last): File "...anaconda3/bin/dytb_train", line 66, in
sys.exit(main())
File "...anaconda3/bin/dytb_train", line 56, in main
comment=ARGS.comment)
File "...tensorflow_tools/dtb/dytb/train.py", line 217, in train
return Trainer(model, dataset, args, steps, paths).train()
File "...tensorflow_tools/dtb/dytb/trainer/Trainer.py", line 112, in train
var_list=variables_to_train(self._args["trainable_scopes"]))
File "...anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 315, in minimize
grad_loss=grad_loss)
File "...anaconda3/lib/python3.6/site-packages/tensorflow/python/training/optimizer.py", line 380, in compute_gradients
raise ValueError("No variables to optimize.")
ValueError: No variables to optimize.