```
import tensorflow as tf
from tensorflow import keras
x = tf.random.normal([2, 3])
model = keras.Sequential([
keras.layers.Dense(2, activation='relu'),
keras.layers.Dense(2, activation='relu'),
keras.layers.Dense(2)
])
# 设置模型开始的维度,如果这里的维度和输入数据不符合就会报错
model.build(input_shape=[None, 3])
# summary 打印的功能
model.summary()
for p in model.trainable_variables:
print(p.name, p.shape)
```

Tensorflow: 全连接