Skip to content

Commit

Permalink
Merge pull request #234 from pollytur/fix_shift_replacement_if_define…
Browse files Browse the repository at this point in the history
…d_2d_encoder

fix_shift_replacement_if_defined_2d_encoder
  • Loading branch information
MaxFBurg authored Mar 8, 2024
2 parents 4ceba76 + 463db37 commit a57dc39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neuralpredictors/layers/encoders/firing_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def forward(
if detach_core:
x = x.detach()

if self.shifter:
if self.shifter and shift is None:
# if shift is defined - no need to change it
if pupil_center is None:
raise ValueError("pupil_center is not given")
shift = self.shifter[data_key](pupil_center, trial_idx)
Expand Down

0 comments on commit a57dc39

Please sign in to comment.