DeepTrackAI / deeplay

Other
5 stars 6 forks source link

Allow to set tensors parameter to control what is initialized #104

Closed BenjaminMidtvedt closed 6 months ago

BenjaminMidtvedt commented 6 months ago

You can now specify the tensors to be initialized during weight initialization. This is done with the tensors parameter:

initializer = Normal()
const = Constant()
model.initialize(initializer, tensors=("weight", "bias")) # bias and weights
model.initialize(initializer, tensors="weight") # only weight
model.initialize(const, tensors="bias")