This commit is contained in:
chenxuanhong
2022-01-10 15:03:58 +08:00
parent 573689a591
commit 3783ef0e75
57 changed files with 9520 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import torch
from torch import nn
class Transform_block(nn.Module):
def __init__(self, k_size = 10):
super().__init__()
padding_size = int((k_size -1)/2)
# self.padding = nn.ReplicationPad2d(padding_size)
self.pool = nn.AvgPool2d(k_size, stride=1,padding=padding_size)
def forward(self, input_image):
# h = self.padding(input)
out = self.pool(input_image)
return out