Custom layer 의 패턴: class MyLayer(keras.layers.Layer); __init__ (config), build(input_shape) (weight 생성), call(inputs) (forward). build 가 첫 call 시점에 자동 호출 — 그때 input shape 알게 되고, 그 기반으로 self.add_weight() 호출.
add_weight 의 인자: name, shape, initializer, trainable. 보통 trainable parameter 는 W (weight matrix) 와 b (bias). non-trainable 도 가능 — moving average, mask 등.