'what is equivalent to torch.nn.fold in tensorflow?

i want to convert torch.nn.fold function to tensorflow.

Is there any function just like nn.fold in tensorflow? '''

import torch
import torch.nn as nn
import torch.nn.functional as F
z = F.fold(z, kernel_size=s, output_size=(H1, W1), stride=s)

'''



Solution 1:[1]

It is not equivalent but if you want only the sliding window feature, there are some functions related to it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 U. Jeong