Returns expected num_channels dimensions of an image input.

This is for advanced users only who expect to handle modules with image inputs that might not have the 3 usual RGB channels.

module_or_spec a Module or ModuleSpec that accepts image inputs.
signature a string with the key of the signature in question. If None, the default signature is used.
input_name a string with the input name for images. If None, the conventional input name images for the default signature is used.

An integer with the number of input channels to the module.

ValueError If the channel information is missing or malformed.