Skip to content

Instantly share code, notes, and snippets.

Last active Oct 29, 2018
What would you like to do?
from __future__ import print_function
import keras
#from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K
import numpy as np
import ml_bullgreen_dataset_handler
from sklearn import cross_validation
from keras.callbacks import ModelCheckpoint
from keras.models import load_model
import tensorflow as tf
print('Loading persisted block')
converter = tf.contrib.lite.TocoConverter.from_keras_model_file('weights-improvement-60-0.72_softmax.hdf5')
tflite_model = converter.convert()
open("plantacao-qualidade-detector.tflite", "wb").write(tflite_model)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment