when i define my own layers with tf.keras,like this: def build(self, input_shape): self.input_spec = [InputSpec(shape=input_shape)] shape = (input_shape[self.axis],) #print(