facebookarchive / tutorials

Caffe2 Tutorials
Apache License 2.0
124 stars 60 forks source link

[CIFAR10_part1]Bug in function of AddCheckpoints? #10

Closed PeizeSun closed 5 years ago

PeizeSun commented 5 years ago

def AddCheckpoints(model, checkpoint_iters, db_type): ITER = brew.iter(train_model, "iter") train_model.Checkpoint([ITER] + train_model.params, [], db=os.path.join(unique_timestamp, "cifar10checkpoint%05d.lmdb"), db_type="lmdb", every=checkpoint_iters)

I guess all "train_model" inside AddCheckpoints should be "model", in terms of consistent name. Is this a bug or I misunderstand something?

FilipJakab commented 5 years ago

I suppose there really should be just a 'model' in my opinion...

orionr commented 5 years ago

Good catch! Looks like AddCheckpoints is only ever called with train_model so it is functional as-is, but you're right that it should be model inside the function. @PeizeSun or @TheMaikXX do you want to submit a PR with a fix? If not, we'll take care of it. Thanks.

orionr commented 5 years ago

Fixed by https://github.com/caffe2/tutorials/pull/18