def set_parent(self, parent): Layer.set_parent(self, parent) self.output_shape = self.input_shape input_size = prod(self.input_shape) self.mask = np.arange(input_size).reshape(self.input_shape) self.thresh = int(self.drop_ratio * self.mask.size)
def set_parent(self, parent): Layer.set_parent(self, parent) w_rows = prod(self.input_shape) w_cols = prod(self.output_shape) self.w = self.weight_initialization.get(w_rows, w_cols, self) self.w = np.r_[np.zeros((1, w_cols)), self.w] self.w = self.w.astype(self.dtype) self.dw = np.zeros_like(self.w, dtype=self.w.dtype)
def set_parent(self, parent): Layer.set_parent(self, parent) self.output_shape = self.input_shape
def set_parent(self, parent): Layer.set_parent(self, parent) self.__check_shape(self.input_shape) self.__init_weight(parent) self.__set_output_shape()