tra_set, val_set = load_dataset() observations = args.observations input_size = (args.input_x, args.input_y, observations) framebatch = args.framebatch output_size = (args.input_x, args.input_y) downscale = args.downscale tra_kwag = {'inputs': tra_set, 'framebatch': framebatch} val_kwag = {'inputs': val_set, 'framebatch': framebatch} if args.downscale == 'mix': tra_provider = DataProvider.SpecialSuperResolutionProvider( stride=(1, 1), input_size=input_size, output_size=output_size, batchsize=args.batchsize, shuffle=True) val_provider = DataProvider.SpecialSuperResolutionProvider( stride=(1, 1), input_size=input_size, output_size=output_size, batchsize=-1, shuffle=False) else: tra_provider = DataProvider.SuperResolutionProvider( stride=(1, 1), input_size=input_size, output_size=output_size, batchsize=args.batchsize, shuffle=True)
'std': args.std, 'norm_tar': True } test_kwag = { 'inputs': test_set, 'framebatch': framebatch, 'mean': args.mean, 'std': args.std, 'norm_tar': True } tra_provider = DataProvider.Provider(stride=stride, input_size=input_size, output_size=output_size, prediction_gap=prediction_gap, batchsize=batchsize, pad=pad, pad_value=pad_value, shuffle=True) val_provider = DataProvider.Provider(stride=(4, 4), input_size=input_size, output_size=output_size, prediction_gap=prediction_gap, batchsize=-1, pad=pad, pad_value=pad_value, shuffle=False) test_provider = DataProvider.Provider(stride=stride, input_size=input_size,
default=80, help="spatial length of input of y axis") return parser.parse_args() args = get_arguments() test_set = (np.load(args.datadir + 'milan_tra.npy') - args.mean) / args.std print('test set:', test_set.shape) observations = args.observations input_size = (args.input_x, args.input_y, observations) output_size = (args.input_x, args.input_y) downscale = args.downscale test_provider = DataProvider.MoverProvider(length=observations) test_val = { 'inputs':test_set_y, 'targets':test_set_y, 'special': True if downscale == 'mix' else False, 'keepdims':True} if args.downscale == 2: from up2 import zipper if args.downscale == 4 or 'mix': from up4 import zipper if args.downscale == 10: from up10 import zipper