What is c in ImageList?

Just a quick question for those who are looking through the src code in ImageList. Is c the number of channels in images?

class ImageList(ItemList):
"`ItemList` suitable for computer vision."
_bunch,_square_show,_square_show_res = ImageDataBunch,True,True
def __init__(self, *args, convert_mode='RGB', after_open:Callable=None, **kwargs):
    super().__init__(*args, **kwargs)
    self.convert_mode,self.after_open = convert_mode,after_open
    self.copy_new += ['convert_mode', 'after_open']
    self.c,self.sizes = 3,{}

If I’m not wrong I think it is len(classes). So ‘c’ would be 10 for mnist.
" c , automatically sets the last layer to have the correct number of activations because the data knows how many activations it needs."

2 Likes

I see, thank you, then how come the default for ImageList is to set it to 3? For example on GANs tasks, the c is the default 3.

I have had the same question but i don’t have an answer for that. From my understanding it should be c=2. (original vs generated images). Jeremy does delete that line form the code in th evideo but it is still present in the notebook.

I see, hopefully @jeremy can answer that quick question!