ArtLine
ArtLine copied to clipboard
get_gradient when training
In your trainning code, you use the below function to preprocess the training data.
def get_data(bs,size):
data = (src.label_from_func(lambda x: path_hr/x.name)
.transform(get_transforms(xtra_tfms=[gradient()]), size=size, tfm_y=True)
.databunch(bs=bs,num_workers = 0).normalize(imagenet_stats, do_y=True))
data.c = 3
return data
I'm just wondering if you are calculating gradient images for both the input and target images. Does this mean the network you are training also takes a gradient image as input and generates a gradient image as the output? If so how do you get the final results from the output gradient image?