Пример #1
0
    def __init__(self,
                 in_dims,
                 out_dims,
                 ksize,
                 stride,
                 pad,
                 init_mode="linear",
                 init_scale=1e-3):
        super().__init__()

        self.params["w"] = initialize((out_dims, in_dims, ksize, ksize),
                                      init_mode, init_scale)
        self.params["b"] = initialize(out_dims, "zero")

        self.in_dims = in_dims
        self.out_dims = out_dims
        self.ksize = ksize
        self.stride = stride
        self.pad = pad
Пример #2
0
    def __init__(self, in_dims, out_dims, init_mode="linear", init_scale=1e-3):
        super().__init__()

        self.params["w"] = initialize((in_dims, out_dims), init_mode,
                                      init_scale)
        self.params["b"] = initialize(out_dims, "zero")