I hereby claim:
- I am asimshankar on github.
- I am asimshankar (https://keybase.io/asimshankar) on keybase.
- I have a public key whose fingerprint is 5EB2 02EC 3AE5 51CB BCBA B808 4FFA CDA8 6927 0665
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import tensorflow as tf | |
# Construct the graph | |
x = tf.Variable(1, name='x') | |
y = tf.Variable(2, name='y') | |
sum = tf.assign_add(x, y, name='sum') | |
# Add operations to save and restore checkpoints | |
saver = tf.train.Saver() |
export_path = "./tf" | |
builder = tf.saved_model.builder.SavedModelBuilder(export_path) | |
signature = tf.saved_model.signature_def_utils.predict_signature_def( | |
inputs={"input": mod.input}, | |
outputs={"output": mod.output}) | |
with K.get_session() as sess: | |
builder.add_meta_graph_and_variables(sess=sess, | |
tags=[tag_constants.SERVING], |
# Mostly copied from https://keras.io/applications/#usage-examples-for-image-classification-models | |
# Changing it to use InceptionV3 instead of ResNet50 | |
from keras.applications.inception_v3 import InceptionV3, preprocess_input, decode_predictions | |
from keras.preprocessing import image | |
import numpy as np | |
model = InceptionV3() | |
img_path = 'elephant.jpg' |
Custom Datasets involve adding a new operation.
Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.
This file demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in C++.
Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.
This gist demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in a C program.