Skip to content

Custom initialization for nn layers? #1831

Discussion options

You must be logged in to vote

We usually provide two ways to create nn layers, e.g. via conv1d that would perform the initialization if required or via Conv1d::new that would take the weight tensor as inputs. conv1d calls Conv1d::new and you can easily duplicate the related code to perform a different initialization if you want, e.g. just copy this function and tweak the "kaiming normal" bit to your liking.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@laptou
Comment options

@LaurentMazare
Comment options

@laptou
Comment options

@LaurentMazare
Comment options

@laptou
Comment options

Answer selected by theunnecessarythings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants