Skip to content

Commit f08f7ac

Browse files
authored
fix ftperm.ft_permute in serialize (official-stockfish#362)
1 parent 187f1c1 commit f08f7ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

serialize.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def main():
118118
if args.ft_perm is not None and target_is_nnue:
119119
import ftperm
120120

121+
if not args.source.endswith(".nnue"):
122+
M.coalesce_ft_weights_inplace(nnue.model.feature_set, nnue.model.input)
123+
nnue.model.layer_stacks.coalesce_layer_stacks_inplace()
124+
121125
ftperm.ft_permute(nnue.model, args.ft_perm)
122126

123127
if args.ft_optimize and target_is_nnue:

0 commit comments

Comments
 (0)