Example #1
0
def create_convolution(size, depth, winlen):
    conv_actfun = activation.tanh
    return layers.Serial(
        [layers.Convolution(3, size, winlen, stride=1, fun=conv_actfun)] +
        [layers.Residual(layers.Convolution(size, size, winlen, stride=1, fun=conv_actfun)) for _ in range(depth)] +
        [layers.Convolution(size, 3, winlen, stride=1, fun=activation.linear)]
    )
Example #2
0
 def setUp(self):
     self.layer = nn.Convolution(12, 32, 11, 5, has_bias=True)