def add(self, L: Layer): if not isinstance(L, Layer): raise TypeError if len(self.Layers) > 0: if L.Input_shape is None: L.delayed = False L.Input_shape = self.Layers[-1].n_mem L.fill_delayed_value() if L.Input_shape != self.Layers[-1].n_mem: raise Exception("Layer Dimesion doesn't matched") else: if L.Input_shape is None: raise Exception("Layer Dimesion doesn't matched") self.Layers.append(L)