Python tensorflow.keras.backend.get_value() Examples

The following are 30 code examples of tensorflow.keras.backend.get_value(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module tensorflow.keras.backend , or try the search function .
Example #1
Source File: inceptionresnetv2.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        inceptionresnetv2,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 299, 299) if is_channels_first(data_format) else (batch_saze, 299, 299, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != inceptionresnetv2 or weight_count == 55843464) 
Example #2
Source File: spnasnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        spnasnet,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != spnasnet or weight_count == 4421616) 
Example #3
Source File: polynet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        polynet,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 331, 331) if is_channels_first(data_format) else (batch_saze, 331, 331, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != polynet or weight_count == 95366600) 
Example #4
Source File: optimizers_225tf.py    From keras-adamw with MIT License 6 votes vote down vote up
def get_config(self):
        config = super(SGDW, self).get_config()
        config.update({
            "learning_rate": self._serialize_hyperparameter("learning_rate"),
            "decay": self._serialize_hyperparameter("decay"),
            "momentum": self._serialize_hyperparameter("momentum"),
            "nesterov": self.nesterov,
            'batch_size': int(self.batch_size),
            'total_iterations': int(self.total_iterations),
            'weight_decays': self.weight_decays,
            'use_cosine_annealing': self.use_cosine_annealing,
            't_cur': int(K.get_value(self.t_cur)),
            'eta_t': float(K.get_value(self.eta_t)),
            'eta_min': float(K.get_value(self.eta_min)),
            'eta_max': float(K.get_value(self.eta_max)),
            'init_verbose': self.init_verbose
        })
        return config 
Example #5
Source File: optimizers_225tf.py    From keras-adamw with MIT License 6 votes vote down vote up
def get_config(self):
        config = super(AdamW, self).get_config()
        config.update({
            'learning_rate': self._serialize_hyperparameter('learning_rate'),
            'decay': self._serialize_hyperparameter('decay'),
            'beta_1': self._serialize_hyperparameter('beta_1'),
            'beta_2': self._serialize_hyperparameter('beta_2'),
            'epsilon': self.epsilon,
            'amsgrad': self.amsgrad,
            'batch_size': int(self.batch_size),
            'total_iterations': int(self.total_iterations),
            'weight_decays': self.weight_decays,
            'use_cosine_annealing': self.use_cosine_annealing,
            't_cur': int(K.get_value(self.t_cur)),
            'eta_t': float(K.get_value(self.eta_t)),
            'eta_min': float(K.get_value(self.eta_min)),
            'eta_max': float(K.get_value(self.eta_max)),
            'init_verbose': self.init_verbose
        })
        return config 
Example #6
Source File: example_mnist_bn.py    From qkeras with Apache License 2.0 6 votes vote down vote up
def on_epoch_end(self, epochs, logs):
    max_variance = -1

    for layer in self.model.layers:
      if layer.__class__.__name__ in [
          "BatchNormalization",
          "QBatchNormalization"
      ]:
        variance = np.max(layer.get_weights()[-1])
        if variance > max_variance:
          max_variance = variance

    if max_variance > 32 and self.learning_rate_factor < 100:
      learning_rate = K.get_value(self.model.optimizer.learning_rate)
      self.learning_rate_factor /= 2.0
      print("***** max_variance is {} / lr is {} *****".format(
          max_variance, learning_rate))
      K.eval(K.update(
          self.model.optimizer.learning_rate, learning_rate / 2.0
      )) 
Example #7
Source File: optimizers_225tf.py    From keras-adamw with MIT License 6 votes vote down vote up
def get_config(self):
        config = super(NadamW, self).get_config()
        config.update({
            'learning_rate': self._serialize_hyperparameter('learning_rate'),
            'decay': self._serialize_hyperparameter('decay'),
            'beta_1': self._serialize_hyperparameter('beta_1'),
            'beta_2': self._serialize_hyperparameter('beta_2'),
            'epsilon': self.epsilon,
            'batch_size': int(self.batch_size),
            'total_iterations': int(self.total_iterations),
            'weight_decays': self.weight_decays,
            'use_cosine_annealing': self.use_cosine_annealing,
            't_cur': int(K.get_value(self.t_cur)),
            'eta_t': float(K.get_value(self.eta_t)),
            'eta_min': float(K.get_value(self.eta_min)),
            'eta_max': float(K.get_value(self.eta_max)),
            'init_verbose': self.init_verbose
        })
        return config 
Example #8
Source File: fastseresnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        fastseresnet101b,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        # assert (model != fastseresnet101b or weight_count == 55697960) 
Example #9
Source File: pnasnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        pnasnet5large,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 331, 331) if is_channels_first(data_format) else (batch_saze, 331, 331, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != pnasnet5large or weight_count == 86057668) 
Example #10
Source File: alexnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        alexnet,
        alexnetb,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != alexnet or weight_count == 62378344)
        assert (model != alexnetb or weight_count == 61100840) 
Example #11
Source File: peleenet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        peleenet,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != peleenet or weight_count == 2802248) 
Example #12
Source File: inceptionv3.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        inceptionv3,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 299, 299) if is_channels_first(data_format) else (batch_saze, 299, 299, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != inceptionv3 or weight_count == 23834568) 
Example #13
Source File: zfnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        zfnet,
        zfnetb,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != zfnet or weight_count == 62357608)
        assert (model != zfnetb or weight_count == 107627624) 
Example #14
Source File: diracnetv2.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        diracnet18v2,
        diracnet34v2,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != diracnet18v2 or weight_count == 11511784)
        assert (model != diracnet34v2 or weight_count == 21616232) 
Example #15
Source File: xception.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        xception,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 299, 299) if is_channels_first(data_format) else (batch_saze, 299, 299, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != xception or weight_count == 22855952) 
Example #16
Source File: wrn.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        wrn50_2,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != wrn50_2 or weight_count == 68849128) 
Example #17
Source File: ghostnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        ghostnet,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != ghostnet or weight_count == 5180840) 
Example #18
Source File: inceptionv4.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        inceptionv4,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 299, 299) if is_channels_first(data_format) else (batch_saze, 299, 299, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != inceptionv4 or weight_count == 42679816) 
Example #19
Source File: bninception.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        bninception,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != bninception or weight_count == 11295240) 
Example #20
Source File: darknet53.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        darknet53,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != darknet53 or weight_count == 41609928) 
Example #21
Source File: nasnet.py    From imgclsmob with MIT License 6 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        nasnet_4a1056,
        nasnet_6a4032,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 331, 331) if is_channels_first(data_format) else (batch_saze, 331, 331, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != nasnet_4a1056 or weight_count == 5289978)
        assert (model != nasnet_6a4032 or weight_count == 88753150) 
Example #22
Source File: ttfs.py    From snn_toolbox with MIT License 5 votes vote down vote up
def get_time(self):
        """Get simulation time variable.

            Returns
            -------

            time: float
                Current simulation time.
            """

        return k.get_value(self.time) 
Example #23
Source File: hrnet.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        hrnet_w18_small_v1,
        hrnet_w18_small_v2,
        hrnetv2_w18,
        hrnetv2_w30,
        hrnetv2_w32,
        hrnetv2_w40,
        hrnetv2_w44,
        hrnetv2_w48,
        hrnetv2_w64,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != hrnet_w18_small_v1 or weight_count == 13187464)
        assert (model != hrnet_w18_small_v2 or weight_count == 15597464)
        assert (model != hrnetv2_w18 or weight_count == 21299004)
        assert (model != hrnetv2_w30 or weight_count == 37712220)
        assert (model != hrnetv2_w32 or weight_count == 41232680)
        assert (model != hrnetv2_w40 or weight_count == 57557160)
        assert (model != hrnetv2_w44 or weight_count == 67064984)
        assert (model != hrnetv2_w48 or weight_count == 77469864)
        assert (model != hrnetv2_w64 or weight_count == 128059944) 
Example #24
Source File: ibndensenet.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        ibn_densenet121,
        ibn_densenet161,
        ibn_densenet169,
        ibn_densenet201,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != ibn_densenet121 or weight_count == 7978856)
        assert (model != ibn_densenet161 or weight_count == 28681000)
        assert (model != ibn_densenet169 or weight_count == 14149480)
        assert (model != ibn_densenet201 or weight_count == 20013928) 
Example #25
Source File: ttfs_dyn_thresh.py    From snn_toolbox with MIT License 5 votes vote down vote up
def get_time(self):
        """Get simulation time variable.

            Returns
            -------

            time: float
                Current simulation time.
            """

        return k.get_value(self.time) 
Example #26
Source File: ttfs_corrective.py    From snn_toolbox with MIT License 5 votes vote down vote up
def get_time(self):
        """Get simulation time variable.

            Returns
            -------

            time: float
                Current simulation time.
            """

        return k.get_value(self.time) 
Example #27
Source File: seresnext.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        seresnext50_32x4d,
        seresnext101_32x4d,
        seresnext101_64x4d,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != seresnext50_32x4d or weight_count == 27559896)
        assert (model != seresnext101_32x4d or weight_count == 48955416)
        assert (model != seresnext101_64x4d or weight_count == 88232984) 
Example #28
Source File: mixnet.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    data_format = "channels_last"
    pretrained = False

    models = [
        mixnet_s,
        mixnet_m,
        mixnet_l,
    ]

    for model in models:

        net = model(pretrained=pretrained, data_format=data_format)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 3, 224, 224) if is_channels_first(data_format) else (batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != mixnet_s or weight_count == 4134606)
        assert (model != mixnet_m or weight_count == 5014382)
        assert (model != mixnet_l or weight_count == 7329252) 
Example #29
Source File: igcv3.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        igcv3_w1,
        igcv3_w3d4,
        igcv3_wd2,
        igcv3_wd4,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != igcv3_w1 or weight_count == 3491688)
        assert (model != igcv3_w3d4 or weight_count == 2638084)
        assert (model != igcv3_wd2 or weight_count == 1985528)
        assert (model != igcv3_wd4 or weight_count == 1534020) 
Example #30
Source File: squeezenext.py    From imgclsmob with MIT License 5 votes vote down vote up
def _test():
    import numpy as np
    import tensorflow.keras.backend as K

    pretrained = False

    models = [
        sqnxt23_w1,
        sqnxt23_w3d2,
        sqnxt23_w2,
        sqnxt23v5_w1,
        sqnxt23v5_w3d2,
        sqnxt23v5_w2,
    ]

    for model in models:

        net = model(pretrained=pretrained)

        batch_saze = 14
        x = tf.random.normal((batch_saze, 224, 224, 3))
        y = net(x)
        assert (tuple(y.shape.as_list()) == (batch_saze, 1000))

        weight_count = sum([np.prod(K.get_value(w).shape) for w in net.trainable_weights])
        print("m={}, {}".format(model.__name__, weight_count))
        assert (model != sqnxt23_w1 or weight_count == 724056)
        assert (model != sqnxt23_w3d2 or weight_count == 1511824)
        assert (model != sqnxt23_w2 or weight_count == 2583752)
        assert (model != sqnxt23v5_w1 or weight_count == 921816)
        assert (model != sqnxt23v5_w3d2 or weight_count == 1953616)
        assert (model != sqnxt23v5_w2 or weight_count == 3366344)