Skip to content

Commit 770e837

Browse files
thowellcopybara-github
authored andcommitted
Fix checkpoint.save
PiperOrigin-RevId: 868221106 Change-Id: I81a24e66f1fac351553bbc79c955c0c06a5b76ae
1 parent aed6acc commit 770e837

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

brax/training/checkpoint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ def save(
162162
for init_fn_name in _KERNEL_INIT_FN_KEYWORDS:
163163
if init_fn_name not in config_cp_dict['network_factory_kwargs']:
164164
continue
165+
if config_cp_dict['network_factory_kwargs'][init_fn_name] is None:
166+
continue
165167
name_ = config_cp_dict['network_factory_kwargs'][init_fn_name].__name__
166168
if name_ not in networks.KERNEL_INITIALIZER:
167169
raise ValueError(

0 commit comments

Comments
 (0)