Example #1
0
 def forward(self, x):
     x = self.conv1(x)
     if self.subpixel:
         x = nn.space_to_depth(x, 2)
     if self.use_activator:
         x = tf.nn.leaky_relu(x, 0.1)
     return x
Example #2
0
                def forward(self, x):
                    x = self.conv1(x)

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

                    if self.use_activator:
                        x = nn.gelu(x)
                    return x