Skip to content

Modifying a strategy to allow for the model to have more than one output. #437

Answered by vlomonaco
JothamWong asked this question in Q&A
Discussion options

You must be logged in to vote

Answer from @Mattdl: "self.logits is returned the output of the self.model(), hence calling the forward() if your model. By overriding the forward, you can just return a tuple in forward(), then you can access this anywhere in your strategy with self.logits[index-in-tuple]."

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JothamWong
Comment options

@vlomonaco
Comment options

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