Skip to content

Commit

Permalink
Fix None encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
asistradition committed Jul 5, 2024
1 parent 7ee6ef0 commit 120f239
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion supirfactor_dynamical/_io/_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def read(

for encoded_arg in _SERIALIZE_ENCODED_ARGS:
if encoded_arg in kwargs:
kwargs[encoded_arg] = _DECODE_ACTIVATIONS[kwargs[encoded_arg]]
if kwargs[encoded_arg] is None:
pass
else:
kwargs[encoded_arg] = _DECODE_ACTIVATIONS[kwargs[encoded_arg]]

# Do special loading stuff for the big biophysical model
if _state_model == 'biophysical':
Expand Down
3 changes: 1 addition & 2 deletions supirfactor_dynamical/training/train_simple_decoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ def train_simple_multidecoder(
axis=0,
weights=np.array(_validation_n)
),
validation_n=np.sum(_validation_n),

validation_n=np.sum(_validation_n)
)

model_ref.current_epoch = epoch_num
Expand Down

0 comments on commit 120f239

Please sign in to comment.