Fix eval frequency
Former-commit-id: 1c6a9505c964fdd1bc7d55887725551afc94b956
This commit is contained in:
parent
fb5f60fb31
commit
63f889a4b0
2
train.py
2
train.py
|
@ -89,7 +89,7 @@ def train_net(net,
|
||||||
|
|
||||||
pbar.update(imgs.shape[0])
|
pbar.update(imgs.shape[0])
|
||||||
global_step += 1
|
global_step += 1
|
||||||
if global_step % (len(dataset) // (10 * batch_size)) == 0:
|
if global_step % (n_train // (10 * batch_size)) == 0:
|
||||||
for tag, value in net.named_parameters():
|
for tag, value in net.named_parameters():
|
||||||
tag = tag.replace('.', '/')
|
tag = tag.replace('.', '/')
|
||||||
writer.add_histogram('weights/' + tag, value.data.cpu().numpy(), global_step)
|
writer.add_histogram('weights/' + tag, value.data.cpu().numpy(), global_step)
|
||||||
|
|
Loading…
Reference in a new issue