<jupyter_start><jupyter_text>Counting for MicroNet Challenge Score Altough we thoroughly specified the calculation results of our model in `readme.md` file, we double checked the score using refactored counting code which has uploaded by the organizers: [official counting code](https://github.com/google-research/google-research/blob/master/micronet_challenge/counting.py)We defined our `read model` module and `counting module` for newly defined operations. Since our backbone architecture is following EfficientNet, which was the example of official counting code, we examined our counting code for EfficientNet.The result from our counting code was same with official counting code for EfficientNet. Below are the results for the score for our model and EfficientNet  1. EfficientNet-b0<jupyter_code>import os
import sys
import math
import copy
import torch
import torch.nn as nn
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torchvision.models as models

from data_utils import *
from train_tools import *
from models import *
from counting import *

dataloaders, dataset_sizes = cifar_100_setter(batch_size=128, 
                                              valid_size=5000,
                                              root='./',
                                              fixed_valid=True,
                                              autoaugment=False)

blocks_args = [
    'r1_k3_s1_e1_i32_o16_se0.25', 
    'r2_k3_s2_e6_i16_o24_se0.25', 
    'r2_k5_s2_e6_i24_o40_se0.25',  
    'r3_k3_s2_e6_i40_o80_se0.25',  
    'r3_k5_s1_e6_i80_o112_se0.25',  
    'r4_k5_s2_e6_i112_o192_se0.25',  
    'r1_k3_s1_e6_i192_o320_se0.25'
]

blocks_args, global_params = efficientnet(blocks_args=blocks_args,
                                          resolution_coefficient=1,
                                          width_coefficient=1, 
                                          depth_coefficient=1, 
                                          image_size=224, 
                                          num_classes=1000)

model = EfficientNet(blocks_args, 
                     global_params)

model.to('cuda:1')<jupyter_output>0it [00:00, ?it/s]<jupyter_text>2. Score of EfficientNet-b0<jupyter_code>from counting import *

# add_bits_base=32, since 32 bit adds count 1 add.
# mul_bits_base=32, since multiplications with 32 bit input count 1 multiplication.
conv_stem = {'kernel': 3, 'stride': 2, 'out_channel': 32}
last_ops = {'out_channel': 1280, 'num_classes': 1000}
activation = 'swish'
input_size = 224
use_bias = True

counter = MicroNetCounter(conv_stem, blocks_args, global_params, last_ops, activation, input_size, use_bias, add_bits_base=32, mul_bits_base=32)

# Constants
INPUT_BITS = 16
ACCUMULATOR_BITS = 32
PARAMETER_BITS = INPUT_BITS
SUMMARIZE_BLOCKS = True
SPARSITY = 0.0

params, flops, _, _ = counter.print_summary(SPARSITY, PARAMETER_BITS, ACCUMULATOR_BITS, INPUT_BITS, summarize_blocks=SUMMARIZE_BLOCKS)

print('#'*50)
print("flops: {:.4f}M, params: {:.4f}MBytes".format(flops, params))
print('score: {:.4f} + {:.4f} = {:.4f}'.format(flops/(10490), params/(36.5*4), flops/(10490) + params/(36.5*4)))<jupyter_output>op_name                     inp_size   kernel_size   in channels  out channels  params(MBytes)   mults(M)    adds(M)     MFLOPS
==================================================
_conv_stem                       224             3             3            32           0.002      6.021     11.239     17.261
block_0                          112            -1            32            -1           0.003      5.821     10.839     16.659
block_1                          112            -1            16            -1           0.012     17.010     31.010     48.020
block_2                           56            -1            24            -1           0.021     14.452     27.548     42.000
block_3                           56            -1            24            -1           0.030      9.992     18.855     28.848
block_4                           28            -1            40            -1           0.062     10.540     20.514     31.054
block_5                           28            -1   [...]<jupyter_text>3. Further ValidationFollowing parts are definitions for named tuples in official counting code.We examined our counting code for EfficientNet to verify the result of `read model` in official code and our code is same.<jupyter_code>import collections

Conv2D = collections.namedtuple(
    'Conv2D', ['input_size', 'kernel_shape', 'strides', 'padding', 'use_bias',
               'activation'])

"""Operation definition for 2D depthwise convolution.
Only difference compared to Conv2D is the kernel_shape[3] = 1.
"""
DepthWiseConv2D = collections.namedtuple(
    'DepthWiseConv2D', ['input_size', 'kernel_shape', 'strides', 'padding',
                        'use_bias', 'activation'])

"""Operation definition for Global Average Pooling.
Attributes:
  input_size: int, Dimensions of the input image (square assumed).
  n_channels: int, Number of output dimensions.
"""
GlobalAvg = collections.namedtuple('GlobalAvg', ['input_size', 'n_channels'])

"""Operation definitions for elementwise multiplication and addition.
Attributes:
  input_size: int, Dimensions of the input image (square assumed).
  n_channels: int, Number of output dimensions.
"""
Scale = collections.namedtuple('Scale', ['input_size', 'n_channels'])
Add = collections.namedtuple('Add', ['input_size', 'n_channels'])


"""Operation definitions for elementwise multiplication and addition.
Attributes:
  kernel_shape: list, of length 2. Shape of the weight matrix.
  use_bias: bool, if true a bias term is added to the output.
  activation: str, type of activation applied to the output.
"""
FullyConnected = collections.namedtuple(
    'FullyConnected', ['kernel_shape', 'use_bias', 'activation'])<jupyter_output><empty_output><jupyter_text>Result of read_model for EfficientNet-b0 (from official counting code)<jupyter_code>official = [('_conv_stem', Conv2D(input_size=224, kernel_shape=[3, 3, 3, 32], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('block_0', [('_depthwise_conv', DepthWiseConv2D(input_size=112, kernel_shape=[3, 3, 32, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=112, n_channels=32)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 32, 8], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 8, 32], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=112, n_channels=32)), ('_project_conv', Conv2D(input_size=112, kernel_shape=[1, 1, 32, 16], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_1', [('_expand_conv', Conv2D(input_size=112, kernel_shape=[1, 1, 16, 96], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=112, kernel_shape=[3, 3, 96, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=56, n_channels=96)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 96, 4], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 4, 96], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=56, n_channels=96)), ('_project_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 96, 24], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_2', [('_expand_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 24, 144], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=56, kernel_shape=[3, 3, 144, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=56, n_channels=144)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 144, 6], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 6, 144], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=56, n_channels=144)), ('_project_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 144, 24], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=56, n_channels=144))]), ('block_3', [('_expand_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 24, 144], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=56, kernel_shape=[5, 5, 144, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=28, n_channels=144)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 144, 6], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 6, 144], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=28, n_channels=144)), ('_project_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 144, 40], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_4', [('_expand_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 40, 240], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=28, kernel_shape=[5, 5, 240, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=28, n_channels=240)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 240, 10], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 10, 240], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=28, n_channels=240)), ('_project_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 240, 40], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=28, n_channels=240))]), ('block_5', [('_expand_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 40, 240], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=28, kernel_shape=[3, 3, 240, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=240)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 240, 10], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 10, 240], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=240)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 240, 80], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_6', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[3, 3, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 80], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=480))]), ('block_7', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[3, 3, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 80], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=480))]), ('block_8', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 112], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_9', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=672)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 672, 112], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=672))]), ('block_10', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=672)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 672, 112], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=672))]), ('block_11', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=672)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 672, 192], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_12', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_13', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_14', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_15', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[3, 3, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 320], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('_conv_head', Conv2D(input_size=7, kernel_shape=[1, 1, 320, 1280], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_avg_pooling', GlobalAvg(input_size=7, n_channels=1280)), ('_fc', FullyConnected(kernel_shape=[1280, 1000], use_bias=True, activation=None))]<jupyter_output><empty_output><jupyter_text>Result of read_model for EfficientNet-b0 (from our counting code)<jupyter_code>mine = [('_conv_stem', Conv2D(input_size=224, kernel_shape=[3, 3, 3, 32], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('block_0', [('_depthwise_conv', DepthWiseConv2D(input_size=112, kernel_shape=[3, 3, 32, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=112, n_channels=32)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 32, 8], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 8, 32], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=112, n_channels=32)), ('_project_conv', Conv2D(input_size=112, kernel_shape=[1, 1, 32, 16], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_1', [('_expand_conv', Conv2D(input_size=112, kernel_shape=[1, 1, 16, 96], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=112, kernel_shape=[3, 3, 96, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=56, n_channels=96)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 96, 4], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 4, 96], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=56, n_channels=96)), ('_project_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 96, 24], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_2', [('_expand_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 24, 144], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=56, kernel_shape=[3, 3, 144, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=56, n_channels=144)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 144, 6], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 6, 144], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=56, n_channels=144)), ('_project_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 144, 24], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=56, n_channels=144))]), ('block_3', [('_expand_conv', Conv2D(input_size=56, kernel_shape=[1, 1, 24, 144], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=56, kernel_shape=[5, 5, 144, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=28, n_channels=144)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 144, 6], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 6, 144], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=28, n_channels=144)), ('_project_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 144, 40], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_4', [('_expand_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 40, 240], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=28, kernel_shape=[5, 5, 240, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=28, n_channels=240)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 240, 10], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 10, 240], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=28, n_channels=240)), ('_project_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 240, 40], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=28, n_channels=240))]), ('block_5', [('_expand_conv', Conv2D(input_size=28, kernel_shape=[1, 1, 40, 240], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=28, kernel_shape=[3, 3, 240, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=240)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 240, 10], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 10, 240], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=240)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 240, 80], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_6', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[3, 3, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 80], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=480))]), ('block_7', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[3, 3, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 80], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=480))]), ('block_8', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 80, 480], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 480, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=480)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 480, 20], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 20, 480], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=480)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 480, 112], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_9', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=672)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 672, 112], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=672))]), ('block_10', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=14, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=14, n_channels=672)), ('_project_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 672, 112], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=14, n_channels=672))]), ('block_11', [('_expand_conv', Conv2D(input_size=14, kernel_shape=[1, 1, 112, 672], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=14, kernel_shape=[5, 5, 672, 1], strides=(2, 2), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=672)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 672, 28], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 28, 672], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=672)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 672, 192], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('block_12', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_13', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_14', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[5, 5, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 192], strides=(1, 1), padding='same', use_bias=True, activation=None)), ('_skip_add', Add(input_size=7, n_channels=1152))]), ('block_15', [('_expand_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 192, 1152], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_depthwise_conv', DepthWiseConv2D(input_size=7, kernel_shape=[3, 3, 1152, 1], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_reduce_mean', GlobalAvg(input_size=7, n_channels=1152)), ('_se_reduce', Conv2D(input_size=1, kernel_shape=[1, 1, 1152, 48], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_se_expand', Conv2D(input_size=1, kernel_shape=[1, 1, 48, 1152], strides=(1, 1), padding='same', use_bias=True, activation='sigmoid')), ('_se_scale', Scale(input_size=7, n_channels=1152)), ('_project_conv', Conv2D(input_size=7, kernel_shape=[1, 1, 1152, 320], strides=(1, 1), padding='same', use_bias=True, activation=None))]), ('_conv_head', Conv2D(input_size=7, kernel_shape=[1, 1, 320, 1280], strides=(1, 1), padding='same', use_bias=True, activation='swish')), ('_avg_pooling', GlobalAvg(input_size=7, n_channels=1280)), ('_fc', FullyConnected(kernel_shape=[1280, 1000], use_bias=True, activation=None))]<jupyter_output><empty_output><jupyter_text>Verification<jupyter_code>official == mine<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19685707596862928, 'fraction_numerical': 0.07845604588552031, 'mean_word_length': 7.9084984358706985, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 33, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '296778', 'license': 'MIT', 'n_tokens_mistral': 14171, 'n_tokens_neox': 12248, 'n_words': 2575, 'path': 'counting.ipynb', 'repo_name': 'Lee-Gihun/Micronet_GSJ', 'size': '34172'}