示例#1
0
 def forward(self, inp):
     x = self.conv1(inp)
     x = nn.tf_gelu(x)
     x = self.conv2(x)
     x = inp + x
     x = nn.tf_gelu(x)
     return x
示例#2
0
            def forward(self, x):
                x = self.conv1(x)

                if self.subpixel:
                    x = nn.tf_space_to_depth(x, 2)

                if self.use_activator:
                    x = nn.tf_gelu(x)
                return x
示例#3
0
 def forward(self, x):
     x = self.conv1(x)
     x = nn.tf_gelu(x)
     x = nn.tf_depth_to_space(x, 2)
     return x