brain-score/vision

MicrosaccadeHelper not re-initializing self._number_of_trials

Opened this issue · 0 comments

Problem: Currently the MicrosaccadeHelper does not re-initialize self.number_of_trials after a model candidate calls start_task(require_variance=True, number_of_trials=>2). This is a problem when in fitting microsaccades are wanted, but during candidate.look_at() microsaccades are not wanted (i.e., candidate.look_at(require_variance=False, number_of_trials=1)). This results in an error in core.py _package_layer, as the expected dimensions do not match (number_of_trials is read out incorrectly).

Workaround: when calling microsaccades on the fitting stimuli, but not the testing stimuli, call candidate.look_at(require_variance=True, number_of_trials=1) to correctly set the expected number_of_trials.

Solution: always re-initialize MicrosaccadeHelper.number_of_trials regardless of whether require_variance is True or False, or other similar approach.