-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Labels
Priority: MediumSize: MediumFor moderately sized issuesFor moderately sized issuesbugSomething isn't workingSomething isn't working
Description
In the gibbs sampling routine, the "requires_grad=True" flag in the weights and biases pollutes the routine. I ran into this problem in my multinomial RBM code. We never clear the gradient cache for just wanting to sample the RBM, so the loop over the number of gibbs steps builds and builds the cache. Can be fixed (I think) with just saying "with torch.no_grad():" then the gibbs sampling routine commences (bypasses any "requires_grad=True" and saving to cache I think).
But we might run into issues if we have this there because during training we need to sample the RBM of course, so I'm unsure what "with torch.no_grad():" will do during training since we actually need "requires_grad = True".
Metadata
Metadata
Assignees
Labels
Priority: MediumSize: MediumFor moderately sized issuesFor moderately sized issuesbugSomething isn't workingSomething isn't working