Skip to content

Commit 95bf226

Browse files
committed
pre-commit fix
1 parent 693c657 commit 95bf226

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

nn_utils.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import pickle as pkl
44
import random
5-
from glob import glob
65
from io import BytesIO
76
from pathlib import Path
87
from typing import Callable
@@ -207,7 +206,7 @@ def absorb_batchNorm(model_target, model_original):
207206
continue
208207
weights = layer.get_weights()
209208
new_weights = model_original.get_layer(layer.name).get_weights()
210-
l = len(new_weights)
209+
l = len(new_weights) # noqa: E741 # If l looks like 1 by any chance, change your font.
211210
layer.set_weights([*new_weights, *weights[l:]][: len(weights)])
212211

213212

@@ -220,11 +219,6 @@ def set_seed(seed):
220219
tf.config.experimental.enable_op_determinism()
221220

222221

223-
import json
224-
225-
import h5py as h5
226-
227-
228222
def get_best_ckpt(save_path: Path, take_min=False):
229223
ckpts = list(save_path.glob('*.h5'))
230224

0 commit comments

Comments
 (0)