def get_batch(batch_size,original_size,shrunk_size):
global batch_index
max_counter = len(train_set)//batch_size
counter = batch_index % max_counter # batch_index范围 0-19
window = [x for x in range(counter*batch_size,(counter+1)*batch_size)]
imgs = [train_set[q] for q in window]
x = [transform.resize(get_image(q,original_size),(shrunk_size,shrunk_size)) for q in imgs]
y = [get_image(q,original_size) for q in imgs]
batch_index = (batch_index+1)%max_counter
return x,y
SR取图像集
猜你喜欢
转载自blog.csdn.net/weixin_41855385/article/details/84396704
今日推荐
周排行