Skip to content

Question: how can one use TrainState.cache? #893

Answered by avik-pal
luisaforozco asked this question in Q&A
Discussion options

You must be logged in to vote

cache is an internal field. It is used by the backend implementations, i.e. the ones defined in the extensions like Zygote, Enzyme, etc. to cache intermediate buffers and such. It is not meant to be exposed to the external user.

For your case, you should simply create an external cache and update it as necessary without involving the TrainState.

Replies: 1 comment 1 reply

Comment options

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

Answer selected by avik-pal
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
Converted from issue

This discussion was converted from issue #892 on September 10, 2024 14:35.