Closed CarloLucibello closed 3 years ago
this should be ready for review and merge
I am curious about assigning the element types of layer parameters. Shouldn't we provide a way for specifying the element types, such as T=Float32
?
I am curious about assigning the element types of layer parameters. Shouldn't we provide a way for specifying the element types, such as T=Float32?
We discussed this at length in Flux. In the end the approach we took is the following:
init
method (glorot_uniform), returns Float32 arraysinit = (dims...) -> randn(Float16, dims...)
Dense(w, b)
model |> fp32
On current master,
bias=false
initialized the weights to zero, but the bias remains a learnable parameter. This PR fixes this problem and makes the interface consistent with Flux's initialization.This PR also imposes stricter parametrization on layers' fields
This a breaking PR