Parameter Management

https://d2l.ai/chapter_builders-guide/parameters.html

To align to mxnet,pytorch, tensorflow’s MyInit class should be:

class MyInit(tf.keras.initializers.Initializer):
def call(self, shape, dtype=None):
data=tf.random.uniform(shape,-10, 10, dtype=dtype)
factor=(tf.abs(data)>=5)
factor=tf.cast(factor,tf.float32)
return data*factor

tf

Hi @zhangjiekui, great catch! Would you like to be a contributor and post a PR for this at github?

How do I go about training an MLP? Am I printing the gradients and parameters throughout the training process?