ArtLine icon indicating copy to clipboard operation
ArtLine copied to clipboard

get_gradient when training

Open whateverThisIs opened this issue 4 years ago • 0 comments

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?

whateverThisIs avatar Dec 22 '20 01:12 whateverThisIs