Chapter9 - training strategy - coding practice problem #11
-
|
Hello I am trying to solve chapter 9 training practic, and when I try to evaluate the modelfor the given image I get this error: Can someone explain to me why do I get this error? Thank you! Here is my code: img_array = imread(train_imageinfo_list[0][0]) channel_adder = AddChannel() model= models.vgg16() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
To use torchvision models, your input should have 3 channels. You can use MONAI's from monai.transforms import RepeatChannel
channel_repeater = RepeatChannel(3)
img = channel_repeater(img)Here is the link to complete documentation of this transform. |
Beta Was this translation helpful? Give feedback.
To use torchvision models, your input should have 3 channels. You can use MONAI's
RepeatChanneltransform to achieve this. For example:Here is the link to complete documentation of this transform.