neuronets / nobrainer_training_scripts

1 stars 2 forks source link

increase batch size to remove for loop which is inefficient #3

Closed hvgazula closed 6 months ago

hvgazula commented 6 months ago

https://github.com/neuronets/nobrainer_training_scripts/blob/c985279985771e424ac60347dedd6d158204b099/1.2.0/callbacks.py#L30 and https://github.com/neuronets/nobrainer_training_scripts/blob/c985279985771e424ac60347dedd6d158204b099/1.2.0/callbacks.py#L45

hvgazula commented 6 months ago

While I wrote my custom prediction script inside a callback, ideally we should be using this https://github.com/neuronets/nobrainer/blob/976691d685824fd4bba836498abea4184cffd798/nobrainer/prediction.py#L15 to be able to extend to all models.

satra commented 6 months ago

isn't predict already in the api? for prediction inside a callback, isn't that also happening in the validation callback?

hvgazula commented 6 months ago

yes, the predict is available (as pointed out in the previous comment). I put aside a test set and was quickly prototyping things and am now integrating it into the API, hence some comments. At the time of prototyping, the predict method (as I saw it) was wrapped inside the nobrainer model object and I didn't want to wait until I understood all of that. Also, I wanted to control some outputs as well. For example, saving both ground truth and predictions as pngs ala the images I shared with you on slack.

hvgazula commented 6 months ago

PS: if you have a minute please check /om2/user/hgazula/nobrainer_training_scripts/output/brainy_mc6/predictions

hvgazula commented 6 months ago

closing as the predict function from the API works fine.