Tensor Slicing and One class Classification

Hi I wanted to implement this network, i somehow know the concept, but i do not know how to do the tensor slicing(slice feature map to patches) in pytorch.

And also, how do I do one class classification in pytorch? ex : i want to achieve something like what i draw behind where i could classify each patch of vector and for example I sliced 4 patches, if one patch is classified as NG, then the whole images will be considered as NG image.

Thank you.