Last active
October 29, 2018 16:33
-
-
Save munhra/b4b98e47f2453e00cbbd6ecba713b796 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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