File /usr/local/lib/python3.10/site-packages/keras/src/layers/preprocessing/normalization.py:228, in Normalization.adapt(self, data)
225 input_shape = tuple(data.element_spec.shape)
227 if not self.built:
→ 228 self.build(input_shape)
229 else:
230 for d in self._keep_axis:
UnboundLocalError: local variable ‘input_shape’ referenced before assignment
Hi @TMosh thanks for the response but Normalization layer doesn’t take training data as input. adapt() is only way to make it learn. But out of curiosity, if you don’t use Normalization layer, then which way do you use to normalize data in neural networks?