Skip to content

Instantly share code, notes, and snippets.

@iamyb
iamyb / tflite_batch_norm.py
Last active November 27, 2020 09:07
This is an example to convert tensorflow(v1.13) model with batchnorm to tflite.
import os
import argparse
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.examples.tutorials.mnist import input_data
## Arguments
parser = argparse.ArgumentParser(prog='python tflite_batch_norm.py')
group = parser.add_mutually_exclusive_group()