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

validate loss cannot update #24

Open
Arui1 opened this issue Sep 29, 2019 · 2 comments
Open

validate loss cannot update #24

Arui1 opened this issue Sep 29, 2019 · 2 comments

Comments

@Arui1
Copy link

Arui1 commented Sep 29, 2019

image
loss and prec1 during training is a normal drop, but during validate ,loss is always some value, prec1 also keep zero. do you met this problem?

@JiyueWang
Copy link

I have no problem on the cifar10 dataset, but I got the same problem as you when transfer to my own local data. Have you solved the problem?

@JiyueWang
Copy link

I have solved my problem. The reason is the trainset is not shuffled before split it. Shuffle the indices before split
indices = list(range(n_train))
shuffle = 1
if shuffle:
np.random.seed(42)
np.random.shuffle(indices)
train_sampler = torch.utils.data.sampler.SubsetRandomSampler(indices[:split])

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