Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error/ loss aways equal 87.3362. I change the lr but not work. #1

Open
mqchen1993 opened this issue Nov 28, 2017 · 8 comments
Open

Comments

@mqchen1993
Copy link

I1128 08:59:24.073550 14972 solver.cpp:397] Test net output #0: Accuracy1 = 1
I1128 08:59:24.073571 14972 solver.cpp:397] Test net output #1: SoftmaxWithLoss1 = 87.3362 (* 1 = 87.3362 loss)
I1128 08:59:24.187857 14972 solver.cpp:218] Iteration 1170 (6.24905 iter/s, 62.4095s/390 iters), loss = 87.3363
I1128 08:59:24.187876 14972 solver.cpp:237] Train net output #0: SoftmaxWithLoss1 = 87.3365 (* 1 = 87.3365 loss)
I1128 08:59:24.187881 14972 sgd_solver.cpp:105] Iteration 1170, lr = 0.1
I1128 09:00:11.118723 14972 solver.cpp:330] Iteration 1560, Testing net (#0)
I1128 09:00:26.383985 14979 data_layer.cpp:73] Restarting data prefetching from start.
I1128 09:00:26.506765 14972 solver.cpp:397] Test net output #0: Accuracy1 = 1
I1128 09:00:26.506784 14972 solver.cpp:397] Test net output #1: SoftmaxWithLoss1 = 87.3362 (* 1 = 87.3362 loss)
I1128 09:00:26.621100 14972 solver.cpp:218] Iteration 1560 (6.24695 iter/s, 62.4305s/390 iters), loss = 87.3363
I1128 09:00:26.621127 14972 solver.cpp:237] Train net output #0: SoftmaxWithLoss1 = 87.3365 (* 1 = 87.3365 loss)
I1128 09:00:26.621134 14972 sgd_solver.cpp:105] Iteration 1560, lr = 0.1
I1128 09:01:13.576076 14972 solver.cpp:330] Iteration 1950, Testing net (#0)
I1128 09:01:33.771523 14979 data_layer.cpp:73] Restarting data prefetching from start.
I1128 09:01:34.000592 14972 solver.cpp:397] Test net output #0: Accuracy1 = 1
I1128 09:01:34.000615 14972 solver.cpp:397] Test net output #1: SoftmaxWithLoss1 = 87.3362 (* 1 = 87.3362 loss)
I1128 09:01:34.220914 14972 solver.cpp:218] Iteration 1950 (5.76949 iter/s, 67.597s/390 iters), loss = 87.3363
I1128 09:01:34.220949 14972 solver.cpp:237] Train net output #0: SoftmaxWithLoss1 = 87.3365 (* 1 = 87.3365 loss)
I1128 09:01:34.220955 14972 sgd_solver.cpp:105] Iteration 1950, lr = 0.1
I1128 09:03:16.823488 14972 solver.cpp:330] Iteration 2340, Testing net (#0)
I1128 09:03:48.873394 14979 data_layer.cpp:73] Restarting data prefetching from start.
I1128 09:03:49.115883 14972 solver.cpp:397] Test net output #0: Accuracy1 = 1
I1128 09:03:49.115906 14972 solver.cpp:397] Test net output #1: SoftmaxWithLoss1 = 87.3362 (* 1 = 87.3362 loss)
I1128 09:03:49.344960 14972 solver.cpp:218] Iteration 2340 (2.88635 iter/s, 135.119s/390 iters), loss = 87.3363

@razorx89
Copy link
Owner

Without further information about your training setup, I am unable to help you. What does your solver.prototxt look like? Which network did you use? On which dataset are you training? A constant high loss value normally indicates an issue with the optimizer settings (too high learning rate or weight decay).

@mqchen1993
Copy link
Author

mqchen1993 commented Nov 28, 2017 via email

@razorx89
Copy link
Owner

No, it is not.

@mqchen1993
Copy link
Author

mqchen1993 commented Nov 28, 2017 via email

@razorx89
Copy link
Owner

You did not attach any prototxt file above. Furthermore, I requested the solver.prototxt and not trainval.prototxt (solver.prototxt is not included in the examples).

@mqchen1993
Copy link
Author

mqchen1993 commented Nov 28, 2017 via email

@razorx89
Copy link
Owner

Your learning rate seems very low. I had a look at my old experiments and here is one of my solver configs:

net: "cifar100_WRN-16-8_train_val.prototxt"
max_iter: 46875

test_iter: 100
test_interval: 391
test_initialization: false

display: 10
average_loss: 10

solver_mode: GPU
type: "Nesterov"
momentum: 0.9
base_lr: 0.1
weight_decay: 0.00025
lr_policy: "step"
stepsize: 15625
gamma: 0.1

snapshot: 3907
snapshot_prefix: "snapshot_cifar100_WRN-16-8"

Since you are specifying momentum you should also specify the solver type (defaults to SGD https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto#L212). Besides that it could be that your input data has errors. Please check on how you are building your lmdbs.

@mqchen1993
Copy link
Author

mqchen1993 commented Nov 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants