machine learning - How to use Tensorflow inference models to generate deepdream like images -


i using custom image set train neural network using tensorflow api. after successful training process these checkpoint files containing values of different training var. want inference model these checkpoint files, found script that, can use generate deepdream images explained in tutorial. problem when load model using:

import tensorflow tf model_fn = 'export'  graph = tf.graph() sess = tf.interactivesession(graph=graph) tf.gfile.fastgfile(model_fn, 'rb') f:   graph_def = tf.graphdef()   graph_def.parsefromstring(f.read()) t_input = tf.placeholder(np.float32, name='input') imagenet_mean = 117.0 t_preprocessed = tf.expand_dims(t_input-imagenet_mean, 0) tf.import_graph_def(graph_def, {'input':t_preprocessed}) 

i error:

graph_def.parsefromstring(f.read())

self.mergefromstring(serialized)

raise message_mod.decodeerror('unexpected end-group tag.') google.protobuf.message.decodeerror: unexpected end-group tag.

the script expect protocol buffer file, not sure script using generate inference models giving me proto buffer files or not.

can please suggest doing wrong, or there better way achieve this. want convert checkpoint files generated tensor proto buffer.

thanks


Comments