abhaydoke09 / Bilinear-CNN-TensorFlow

This is an implementation of Bilinear CNN for fine grained visual recognition using TensorFlow.
191 stars 72 forks source link

about learning rate #3

Closed chencodeX closed 6 years ago

chencodeX commented 7 years ago

In the second step of training, I used a smaller batch size, does that mean I need to use a smaller learning rate than 0.001?

abhaydoke09 commented 7 years ago

This has some interesting discussions about batch_size vs learning_rate. https://github.com/NVIDIA/DIGITS/issues/51

chencodeX commented 7 years ago

Another problem, in the second step, when I use 224 224 3 size data to train, it will prompt me to be wrong: Traceback (most recent call last): File "bcnn_finetuning.py", line 374, in val_loss += sess.run(loss, feed_dict={imgs: batch_val_x, target: batch_val_y}) File "/opt/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 767, in run run_metadata_ptr) File "/opt/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 965, in _run feed_dict_string, options, run_metadata) File "/opt/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1015, in _do_run target_list, options, run_metadata) File "/opt/anaconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1035, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: logits and labels must be same size: logits_size=[2,100] labels_size=[8,100] [[Node: SoftmaxCrossEntropyWithLogits = SoftmaxCrossEntropyWithLogits[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/gpu:0"](Reshape_2, Reshape_3)]]

I'm sorry, I'm just a novice.

abhaydoke09 commented 7 years ago

I think the problem is in the image size. Look at this issue. https://github.com/abhaydoke09/Bilinear-CNN-TensorFlow/issues/5