@ptrblck  plz , my tensor is equal zeros, but in the image attach values are not equal to tensors
patch_size = (5,5)
print(val_x.shape)
new_image = image.reconstruct_from_patches_2d(val_x.numpy(),(1,5,5))
plt.subplot(5, 5, 1)
plt.title('Image')
plt.imshow(np.squeeze(new_image),cmap='gray' )


image854×453 18.3 KB

image1 = image.extract_patches_2d(mat_diff[‘nouvelle’], ((5,5)))
I toolk 40% of image1 for testing (val_x), I find 3687 patches , then I realised the reconstrcution of this val_x .