def __init__( self, n_out: int, activation: str, weight_init="xavier_uniform" ) -> None: super().__init__() self.n_in = None self.n_out = n_out self.activation = initialize_activation(activation) # instantiate the weight initializer self.init_weights = initialize_weights(weight_init, activation=activation)
def __init__( self, n_out: int, activation: str = "tanh", weight_init: str = "xavier_uniform", ) -> None: super().__init__() self.n_in = None self.n_out = n_out self.activation = initialize_activation(activation) self.init_weights = initialize_weights(weight_init, activation=activation)
def __init__( self, n_out: int, kernel_shape: Tuple[int], activation: str, stride: int = 1, pad: str = "same", weight_init: str = "xavier_uniform", ) -> None: super().__init__() self.n_in = None self.n_out = n_out self.kernel_shape = kernel_shape self.stride = stride self.pad = pad self.activation = initialize_activation(activation) self.init_weights = initialize_weights(weight_init, activation=activation)