M3d-Cam
M3d-Cam copied to clipboard
Multiple inputs to model producing TypeError
Hi,
My model has multiple inputs, i.e. the forward method of the model has two arguments: fmri_input, anat_input. When I try to wrap the model with model = medcam.inject(model, ...etc), and do forward propagation with: model(fmri_input, anat_input), the script returns the error: "TypeError: forward() missing 1 required positional argument: 'anat_input'".
Is it possible to use medcam on a model that takes multiple inputs?
Thanks!
Hi, you can adapt the trick mentioned here to work with either multiple inputs, outputs or both.
Hi,
My model has multiple inputs, i.e. the forward method of the model has two arguments: fmri_input, anat_input. When I try to wrap the model with model = medcam.inject(model, ...etc), and do forward propagation with: model(fmri_input, anat_input), the script returns the error: "TypeError: forward() missing 1 required positional argument: 'anat_input'".
Is it possible to use medcam on a model that takes multiple inputs?
Thanks!
Have you implemented it? I've encountered the same issue.