Initialze Ivy layer, which is a stateful object consisting of trainable variables.
dev_str (str, optional) – device on which to create the layer’s variables ‘cuda:0’, ‘cuda:1’, ‘cpu’ etc.
v (ivy container, optional) – Ivy container of trainable variables. Created internally by default.
Save the weights on the Module. :param weights_path: The hdf5 file for saving the weights. :type weights_path: string