Hi folks,
I have a hopefully simple question!
In various lesson7 notebooks, basically all the ones on superres, when we create the DataBunch we define a function get_data
to do it for us, like
def get_data(bs,size):
data = (src.label_from_func(lambda x: path_hr/x.name)
.transform(get_transforms(max_zoom=2.), size=size, tfm_y=True)
.databunch(bs=bs).normalize(imagenet_stats, do_y=True))
data.c = 3
return data
but I can’t figure out what the data.c = 3
is there for! I know that in classification problems data.c
is the number of classes and in general is the dimension of the last activation output of the NN … but why is it 3 here?
The output from the unet_type learner will be an image and in fact it is an image! So where does the ‘3’ comes from?
Cheers!