Closed hvgazula closed 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.
isn't predict already in the api? for prediction inside a callback, isn't that also happening in the validation callback?
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.
PS: if you have a minute please check /om2/user/hgazula/nobrainer_training_scripts/output/brainy_mc6/predictions
closing as the predict
function from the API works fine.
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