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

hello!! I trained the model with batchsize of 2048 to epoch_13_13999.bin, and then changed batchsize to 1024 for training epoch14, and the accuracy decreased from 56% to 55%. c #253

Open
leo23ui opened this issue Dec 12, 2024 · 1 comment

Comments

@leo23ui
Copy link

leo23ui commented Dec 12, 2024

hello!! , I trained the model with batchsize of 2048 to epoch_13_13999.bin, and then changed batchsize to 1024 for training epoch14, and the accuracy decreased from 56% to 55%. could you please give me some advice on how to solve this problem? thanks!!! I modified the following code after modifying batchsize.

Modify the code in train.py as follows:

#if num_feed_images >= all_num_feed_images:
#break
if batch_count >= num_batches_per_epoch:
break

Change the code in main.py as follows:

#start_iter = checkpoint['iter_in_epoch'] + 1
start_iter = checkpoint['iter_in_epoch']*2 + 1

@leo23ui leo23ui changed the title dear teachers, I trained the model with batchsize of 2048 to epoch_13_13999.bin, and then changed batchsize to 1024 for training epoch14, and the accuracy decreased from 56% to 55%. c hello!! I trained the model with batchsize of 2048 to epoch_13_13999.bin, and then changed batchsize to 1024 for training epoch14, and the accuracy decreased from 56% to 55%. c Dec 12, 2024
@wkcn
Copy link
Contributor

wkcn commented Dec 14, 2024

It may be related to the optimizer state (the first/second moment in AdamW).

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