Unable to inspect variables after loading weights to not fully built FlexibleDenseModule
@WenjieZ,
Could you please find the [gist](https://colab.research.google.com/gist/tilakrayal/b24b294178cb7ad454a0af3a62d7984b/untitled1128.ipynb) for the mentioned code and confirm whether your observation  and concern is the same or different and also let us know which tensorflow version you are using. Thank you! @tilakrayal,
The mentioned gist shows the same outcome as on my laptop: unable to inspect the variables without first calling the model.

- Tensorflow version: 2.12.0, installed via pip
- Python version: 3.11.3, installed via conda-forge
- OS: MacOS Ventura 13.3.1 (a)  Hi @WenjieZ, this is intended. Checkpoint restoration doesn't create any variables. It restores all existing variables, and for the ones that are missing (i.e. in the Checkpoint but not in the model), it stores some metadata. After variables are created and added to the model, the values are restored. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60552">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60552">No</a>

I found it unable to inspect variables after loading weights to not fully built FlexibleDenseModule. Is it intended or a bug?

How to replicate:
1. Define the `FlexibleDenseModule` and `MySequentialModule` according to the [doc](https://www.tensorflow.org/guide/intro_to_modules). `FlexibleDenseModule` defines the weights only after being called. `MySequentialModule` is composed of two `FlexibleDenseModule`.
2. Instantialize a `MySequentialModule`, called it, and checkpoint-saved its weights.
3. Instantialize a new `MySequentialModule` and checkpoint-loaded its weights.
4. The `variables` attribute does not show anything.
5. After calling it, its `variables` attribute shows the saved weights.

```python
class FlexibleDenseModule(tf.Module):
    # Note: No need for `in_features`
    def __init__(self, out_features, name=None):
        super().__init__(name=name)
        self.is_built = False
        self.out_features = out_features

    def __call__(self, x):
        # Create variables on first call.
        if not self.is_built:
            self.w = tf.Variable(
                tf.random.normal([x.shape[-1], self.out_features]), 
                name='w'
            )
            self.b = tf.Variable(tf.zeros([self.out_features]), name='b')
            self.is_built = True

        y = tf.matmul(x, self.w) + self.b
        return tf.nn.relu(y)


class MySequentialModule(tf.Module):
    def __init__(self, name=None):
        super().__init__(name=name)
        self.dense_1 = FlexibleDenseModule(out_features=3)
        self.dense_2 = FlexibleDenseModule(out_features=2)

    def __call__(self, x):
        x = self.dense_1(x)
        return self.dense_2(x)


my_model = MySequentialModule(name="flexible")
result = my_model(tf.constant([[2.0, 2.0, 2.0]]))
chkp_path = "my_checkpoint"
checkpoint = tf.train.Checkpoint(model=my_model)
checkpoint.write(chkp_path)
print(my_model.variables)


new_model = MySequentialModule(name="new")
new_checkpoint = tf.train.Checkpoint(model=new_model)
new_checkpoint.restore("my_checkpoint")
print(new_model.variables)   # shows ()


new_model(tf.constant([[2.0, 2.0, 2.0]]))
print(new_model.variables)   # shows the loaded weights
```