Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains authored Nov 18, 2024
1 parent 6cccff4 commit 5822175
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pi_zero_pytorch/pi_zero.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,14 @@ def forward_with_reward_cfg(
return_actions_flow = True,
)

maybe_reward_out = self.forward(
action_flow_with_reward, with_reward_cache_kv = self.forward(
*args,
reward_tokens = reward_tokens,
cached_state_keys_values = with_reward_cache,
**forward_kwargs,
**kwargs
)

action_flow_with_reward, with_reward_cache_kv = maybe_reward_out

if not exists(reward_tokens) or cond_scale == 0.:
return action_flow_with_reward, (with_reward_cache_kv, None)

Expand Down

0 comments on commit 5822175

Please sign in to comment.