#5 修改bitch_size以及epoch

Merged
Edwina____ merged 1 commits from edwina____-patch-2 into master 1 year ago
  1. +2
    -2
      train.py

+ 2
- 2
train.py View File

@@ -38,7 +38,7 @@ def main():
with open('class_indices.json', 'w') as json_file:
json_file.write(json_str)

batch_size = 128
batch_size = 64
nw = min([os.cpu_count(), batch_size if batch_size > 1 else 0, 8]) # number of workers
print('Using {} dataloader workers every process'.format(nw))

@@ -77,7 +77,7 @@ def main():
loss_function = nn.CrossEntropyLoss()
optimizer = optim.Adam(net.parameters(), lr=0.0003)

epochs = 25
epochs = 40
best_acc = 0.0
# save_path = './googleNet.pth'
train_steps = len(train_loader)


Loading…
Cancel
Save