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

When the network reaches convergence, The loss has been around 2.0 #47

Open
Hukongtao opened this issue Oct 11, 2018 · 14 comments
Open

Comments

@Hukongtao
Copy link

python train.py --is-training --update-mean-var --train-beta-gamma
to run the network, but when the network reaches convergence, The loss has been around 2.0.
How did you get 0.2?
@hellochick
Thank you very much for your reply.

@Hukongtao
Copy link
Author

And the mIOU is 0.323895

@hellochick
Copy link
Owner

Because you set the flag --update-mean-var, which means that you will update the moving mean and moving variance for batch normalization layer. Such operations need large batch size to update them well.
Can you tell me how large your batch size is?

@Hukongtao
Copy link
Author

@hellochick I get it.My batch size is 2 because my GPU is limited. So I will try again. Thanks a lot.

@Hukongtao
Copy link
Author

@hellochick So I should run by python train.py --is-training or python train.py --is-training --train-beta-gamma

@ningscapr
Copy link

Hi, i have the same situation that the loss is about 2.0. Did you use pretrained model? @Hukongtao

@Hukongtao
Copy link
Author

@ningscapr I didn't use pretrained model. When I use the pretrained model, the initial loss is 0.2, but the training is done, the loss is about 2.0. I don't know why

@waterputty
Copy link

@Hukongtao Hi, have you solved your issue? I followed hellochick's advice del the --update-mean-var but found the loss was still around 2.0 after 90k iterations. I use cityscapes dataset and the batchsize is 2.

@Hukongtao
Copy link
Author

@waterputty No, I didn't

@waterputty
Copy link

@Hukongtao My latest finding is the loss went down to 1.7 after 150k iterations. I think for the cityscapes it may needs much more iterations than 60k in the code, or the learning rate must be set much bigger than 1e-3 which is also from the original code. But I'm not sure. @hellochick Could you give more advice. Thx a lot.

@Hukongtao
Copy link
Author

@waterputty Have you solved your issue? I am still confused

@DenceChen
Copy link

@hellochick can you show your train args? your read.me do not have training introduction

@KodamaXYZ
Copy link

@DenceChen i am also having the same problem my training args are :
@waterputty
IMG_MEAN = np.array((103.939, 116.779, 123.68), dtype=np.float32)

BATCH_SIZE = 1
DATA_DIRECTORY = './data/cityscapes_dataset/cityscape/'
DATA_LIST_PATH = './list/cityscapes_train_list.txt'
IGNORE_LABEL = 255
INPUT_SIZE = '713,713'
LEARNING_RATE = 1e-3
MOMENTUM = 0.9
NUM_CLASSES = 19
NUM_STEPS = 60001
POWER = 0.9
RANDOM_SEED = 1234
WEIGHT_DECAY = 0.0001
RESTORE_FROM = './'
SNAPSHOT_DIR = './model/'
SAVE_NUM_IMAGES = 4
SAVE_PRED_EVERY = 20

i cant set up the Batch for less because it wont run even on a 1080TI gpu with 11gb of memory
after 60k steps i got 2.0 loss
i tried even 150k steps still 1.9 or so.
let me know if you guys succeed

@AmeetR
Copy link

AmeetR commented Jun 3, 2019

I'm having the same issue. The best I'm able to get is 1.7 loss and ~.3 mIOU. @hellochick I want to set this as a baseline, so I'd like to get up to the best possible.

@zhulf0804
Copy link

@AmeetR I think It's hard to reproduce this repo. I ran it 1 month ago, debugged it, and failed.
Then I code PSPNet myself, and achieved 0.74 mIoU.
Maybe you can try to reproduce PSPNet by yourself.
Good luck.

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

8 participants