Skip to content

Commit

Permalink
pre-commit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
calad0i committed Sep 5, 2024
1 parent 693c657 commit 95bf226
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions nn_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import pickle as pkl
import random
from glob import glob
from io import BytesIO
from pathlib import Path
from typing import Callable
Expand Down Expand Up @@ -207,7 +206,7 @@ def absorb_batchNorm(model_target, model_original):
continue
weights = layer.get_weights()
new_weights = model_original.get_layer(layer.name).get_weights()
l = len(new_weights)
l = len(new_weights) # noqa: E741 # If l looks like 1 by any chance, change your font.
layer.set_weights([*new_weights, *weights[l:]][: len(weights)])


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


import json

import h5py as h5


def get_best_ckpt(save_path: Path, take_min=False):
ckpts = list(save_path.glob('*.h5'))

Expand Down

0 comments on commit 95bf226

Please sign in to comment.