Skip to content

Retrieving submodule from module declared with partial #665

Answered by avital
rolandgvc asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Roland, can you return an instance of Net instead a function that creates it? We need to document this better but just calling Dense(3) doesn't actually create any variables, it's just a skeleton "module template" (what we call an "unbound module" in the code)?

Though I think at the moment you still won't have access to Net().backbone because setup is only called when the module is bound... This actually may be good to improve.

Can you say more about your full use-case for accessing net.backbone in your code?

Replies: 1 comment 19 replies

Comment options

You must be logged in to vote
19 replies
@avital
Comment options

@rolandgvc
Comment options

@rolandgvc
Comment options

@avital
Comment options

@rolandgvc
Comment options

Answer selected by rolandgvc
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