--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
def inference(images, graph):
bottleneck_tensor = graph.get_tensor_by_name(ensure_name_has_port(BOTTLENECK_TENSOR_NAME))logits = tf.matmul(bottleneck_tensor, my_new_layer_weights, name='final_matmul') + layer_biases...
We are working on getting full training (and retraining) out, but we didn't want to block releasing this transfer learning example on that. We haven't updated the website with the documentation yet, but you can see more information on the scope of this sample code here:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/how_tos/image_retraining/index.md
We are also working on a fix for the protobuf large files issue that affects classify_image.py and this code.
On Saturday, February 13, 2016, Brett Kuprel <brku...@gmail.com> wrote:
Super awesome that there is code for training inception:--https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.pyIt seems that only the final layers are trained though, right? This isn't exactly fine tuning. I have been running a for loop over the graph operations and replacing the weight constants with variables. https://github.com/kuprel/skin/blob/master/python/inference.py#L276It would be great if the code for constructing the inception network was released, then we wouldn't have to reverse engineer the graph.
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/b14306c1-28fb-4311-84ba-5521b853af58%40tensorflow.org.
The script will write out a version of the Inception v3 network with a final layer retrained to your categories to /tmp/output_graph.pb, and a text file containing the labels to /tmp/output_labels.txt. These are both in a format that the C++ and Python image classification examples can read in, so you can start using your new model immediately.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To post to this group, send email to dis...@tensorflow.org.
def create_graph():
"""Creates a graph from saved GraphDef file and returns a saver."""
retrained_name = 'output_graph.pb'
old_name = 'classify_image_graph_def.pb'
# Creates graph from saved graph_def.pb.
with tf.gfile.FastGFile(os.path.join(
model_dir, retrained_name), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='')
If I use the "old" network, it loads and classifies fine. The code above with the new "output_graph.pb" fails however, giving the following message:
E tensorflow/core/common_runtime/executor.cc:275] Executor failed to create kernel. Invalid argument: NodeDef mentions attr 'data_format' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]>; NodeDef: conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](Mul, conv/conv2d_params)
[[Node: conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](Mul, conv/conv2d_params)]]
Traceback (most recent call last):
File "classify_image.py", line 73, in <module>
tf.app.run()
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "classify_image.py", line 69, in main
run_inference_on_image(image)
File "classify_image.py", line 55, in run_inference_on_image
image_data})
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 315, in run
return self._run(None, fetches, feed_dict)
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 511, in _run
feed_dict_string)
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 564, in _do_run
target_list)
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 586, in _do_call
e.code)
tensorflow.python.framework.errors.InvalidArgumentError: NodeDef mentions attr 'data_format' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_FLOAT, DT_DOUBLE]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]>; NodeDef: conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](Mul, conv/conv2d_params)
[[Node: conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](Mul, conv/conv2d_params)]]
Caused by op u'conv/Conv2D', defined at:
File "classify_image.py", line 73, in <module>
tf.app.run()
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/platform/default/_app.py", line 30, in run
sys.exit(main(sys.argv))
File "classify_image.py", line 69, in main
run_inference_on_image(image)
File "classify_image.py", line 40, in run_inference_on_image
create_graph()
File "classify_image.py", line 23, in create_graph
_ = tf.import_graph_def(graph_def, name='')
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/importer.py", line 238, in import_graph_def
compute_shapes=False, compute_device=False)
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2040, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/home/mingram/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1087, in __init__
self._traceback = _extract_stack()
Do you have any idea what might be going wrong?
Thank you and all the best,
Martin
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To post to this group, send email to dis...@tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/b14306c1-28fb-4311-84ba-5521b853af58%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/2e69e695-8a45-4427-9f0f-3e3b23ca116c%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/b14306c1-28fb-4311-84ba-5521b853af58%40tensorflow.org.
We are working on getting full training (and retraining) out, but we didn't want to block releasing this transfer learning example on that. We haven't updated the website with the documentation yet, but you can see more information on the scope of this sample code here:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/how_tos/image_retraining/index.md
We are also working on a fix for the protobuf large files issue that affects classify_image.py and this code.
On Saturday, February 13, 2016, Brett Kuprel <brku...@gmail.com> wrote:
Super awesome that there is code for training inception:--https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.pyIt seems that only the final layers are trained though, right? This isn't exactly fine tuning. I have been running a for loop over the graph operations and replacing the weight constants with variables. https://github.com/kuprel/skin/blob/master/python/inference.py#L276It would be great if the code for constructing the inception network was released, then we wouldn't have to reverse engineer the graph.
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
Hi again Pete,First off, thanks again for producing this example, it's been really useful!I just wanted to ask: are you still working on a full retraining example? If so, do you have some idea of when it might be released? I'd be curious to try retraining the whole network to see whether it improves performance.Thanks a lot and all the best,
Martin
On Sunday, 14 February 2016 00:14:25 UTC, petewarden wrote:
We are working on getting full training (and retraining) out, but we didn't want to block releasing this transfer learning example on that. We haven't updated the website with the documentation yet, but you can see more information on the scope of this sample code here:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/how_tos/image_retraining/index.md
We are also working on a fix for the protobuf large files issue that affects classify_image.py and this code.
On Saturday, February 13, 2016, Brett Kuprel <brku...@gmail.com> wrote:
Super awesome that there is code for training inception:--https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.pyIt seems that only the final layers are trained though, right? This isn't exactly fine tuning. I have been running a for loop over the graph operations and replacing the weight constants with variables. https://github.com/kuprel/skin/blob/master/python/inference.py#L276It would be great if the code for constructing the inception network was released, then we wouldn't have to reverse engineer the graph.
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/167421f4-0f36-4be7-8b34-076f0ec1acc9%40tensorflow.org.
My colleagues recently released an example of how to do both full retraining, and fine-tuning across all layers. I would recommend starting with the latter, since it often gives the best results:Does that help?
On Thu, Mar 31, 2016 at 4:10 AM, <martin...@gmail.com> wrote:
Hi again Pete,First off, thanks again for producing this example, it's been really useful!I just wanted to ask: are you still working on a full retraining example? If so, do you have some idea of when it might be released? I'd be curious to try retraining the whole network to see whether it improves performance.Thanks a lot and all the best,
Martin
On Sunday, 14 February 2016 00:14:25 UTC, petewarden wrote:
We are working on getting full training (and retraining) out, but we didn't want to block releasing this transfer learning example on that. We haven't updated the website with the documentation yet, but you can see more information on the scope of this sample code here:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/how_tos/image_retraining/index.md
We are also working on a fix for the protobuf large files issue that affects classify_image.py and this code.
On Saturday, February 13, 2016, Brett Kuprel <brku...@gmail.com> wrote:
Super awesome that there is code for training inception:--https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.pyIt seems that only the final layers are trained though, right? This isn't exactly fine tuning. I have been running a for loop over the graph operations and replacing the weight constants with variables. https://github.com/kuprel/skin/blob/master/python/inference.py#L276It would be great if the code for constructing the inception network was released, then we wouldn't have to reverse engineer the graph.
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
--
You received this message because you are subscribed to a topic in the Google Groups "Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/tensorflow.org/d/topic/discuss/ee8UBKRjdQM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/9a62beac-bb8c-488d-a145-94a161ec9117%40tensorflow.org.
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/80526c4f-950f-4b60-8475-06ab50c33f61%40tensorflow.org.
--
You received this message because you are subscribed to a topic in the Google Groups "Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/a/tensorflow.org/d/topic/discuss/ee8UBKRjdQM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CAOLmV945YV3yYwSGiP6GSrksVeJfVdCvVnF6__7Nd4O8OvVL_g%40mail.gmail.com.
http://download.tensorflow.org/models/image/imagenet/inception-v3-2016-03-01.tar.gz
My colleagues recently released an example of how to do both full retraining, and fine-tuning across all layers. I would recommend starting with the latter, since it often gives the best results:Does that help?
On Thu, Mar 31, 2016 at 4:10 AM, <martin...@gmail.com> wrote:
Hi again Pete,First off, thanks again for producing this example, it's been really useful!I just wanted to ask: are you still working on a full retraining example? If so, do you have some idea of when it might be released? I'd be curious to try retraining the whole network to see whether it improves performance.Thanks a lot and all the best,
Martin
On Sunday, 14 February 2016 00:14:25 UTC, petewarden wrote:
We are working on getting full training (and retraining) out, but we didn't want to block releasing this transfer learning example on that. We haven't updated the website with the documentation yet, but you can see more information on the scope of this sample code here:
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/how_tos/image_retraining/index.md
We are also working on a fix for the protobuf large files issue that affects classify_image.py and this code.
On Saturday, February 13, 2016, Brett Kuprel <brku...@gmail.com> wrote:
Super awesome that there is code for training inception:--https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/image_retraining/retrain.pyIt seems that only the final layers are trained though, right? This isn't exactly fine tuning. I have been running a for loop over the graph operations and replacing the weight constants with variables. https://github.com/kuprel/skin/blob/master/python/inference.py#L276It would be great if the code for constructing the inception network was released, then we wouldn't have to reverse engineer the graph.
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/387583a7-d160-40e4-85a9-c0cd9a4d4104%40tensorflow.org.
python retrain.py
on Windows. I have not made any changes to the file retrain.py
. I get the following errorC:\Users\student\Desktop\flowerrecog>python retrain.py
Traceback (most recent call last):
File "retrain.py", line 1105, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "C:\Users\student\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "retrain.py", line 810, in main
maybe_download_and_extract()
File "retrain.py", line 313, in maybe_download_and_extract
_progress)
File "C:\Users\student\Anaconda3\lib\urllib\request.py", line 188, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "C:\Users\student\Anaconda3\lib\urllib\request.py", line 163, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\student\Anaconda3\lib\urllib\request.py", line 466, in open
response = self._open(req, data)
File "C:\Users\student\Anaconda3\lib\urllib\request.py", line 489, in _open
'unknown_open', req)
File "C:\Users\student\Anaconda3\lib\urllib\request.py", line 444, in _call_chain
result = func(*args)
--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/ed3e28f5-b5db-4ec1-ac09-4eb2e50547af%40tensorflow.org.