PatchLayer2D
PythonPatchLayer2D(height: int, width: int, ch: int, patch_height: int, patch_width: int, **kwargs={})Extract flattened patches from images shaped (batch, height, width, ch).
height
Pythonheight = heightwidth
Pythonwidth = widthch_size
Pythonch_size = chpatch_height
Pythonpatch_height = patch_heightpatch_width
Pythonpatch_width = patch_widthresize
Pythonresize = keras.layers.Reshape((-1, patch_height * patch_width * ch))call
Pythoncall(images: Tensor) -> Tensorget_config
Pythonget_config() -> dict[str, Any]show_patched_image
PythonPlot one image and its reconstructed patches; return its batch index.
show_patched_image(images: keras.KerasTensor, patches: keras.KerasTensor) -> intPlot one image and its reconstructed patches; return its batch index.
reconstruct_from_patch
PythonReconstruct one image from non-overlapping patches in row-major order.
reconstruct_from_patch(patch: keras.KerasTensor) -> keras.KerasTensorReconstruct one image from non-overlapping patches in row-major order.