QueuQ / CGLB

Other
49 stars 14 forks source link

Redundant training in testing phase? #6

Closed WeiWeic6222848 closed 1 year ago

WeiWeic6222848 commented 1 year ago

In the following snippet, the model is first training for a user defined epoch, then overwritten by model = pickle.load(open(save_model_path,'rb')).cuda(args['gpu']) if valid == False (which is the case for test phase). Does the training function still serves a purpose or is it redundant?

https://github.com/QueuQ/CGLB/blob/6d71034444031ce4aec5b1a4cbaefcddd6437f04/GCGL/pipeline.py#L370-L389

QueuQ commented 1 year ago

This actually does not incur redundant training, since 'epochs' is set as 0 when it is not training. https://github.com/QueuQ/CGLB/blob/ed14a64283d642eadee7c31dda85886a4dbf1448/GCGL/pipeline.py#L312

WeiWeic6222848 commented 1 year ago

thank you for clarifying this, sorry for missing the obvious variable change