Skip to content

Forward Pass: While Loop #1779

Answered by jheek
pharringtonp19 asked this question in Q&A
Jan 11, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Are you sure you want iterations to be a mutating field of MLP instead of a local variable in __call__?
Also you are calling nn.Dense inside the while loop which means you create a new Dense (with it's own params) each iteration. Are you sure you don't want param sharing and create the nn.Dense instance before entering the while loop?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pharringtonp19
Comment options

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