Skip to content

Commit

Permalink
Fix: logflows of terminating is log(rewards)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed Nov 27, 2023
1 parent 5a135d9 commit f27a826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gflownet/gflownet.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ def detailedbalance_loss(self, it, batch):

# Get logflows
logflow_states = self.state_flow(states_policy).squeeze()
logflow_states[done.eq(1)] = rewards
logflow_states[done.eq(1)] = torch.log(rewards)
# TODO: Optimise by reusing logflow_states and batch.get_parent_indices
logflow_parents = self.state_flow(parents_policy).squeeze()

Expand Down

0 comments on commit f27a826

Please sign in to comment.