Pass the `shape` when creating a `tf.Variable`. (#22460)
The `value` passed can be an initializer and the calling of the initializer may be delayed. Passing the shape immediately when creating the `Variable` helps in some scenarios, for instance when `UninitializedVariable` instances are used. Note that this also works when `self._shape` is `None`.
H
hertschuh committed
2fb46fd14a8a09b148471442080781efed2b664a
Parent: 9d2ebbf
Committed by GitHub <noreply@github.com>
on 3/23/2026, 9:58:53 PM