Comments (3)
This sounds strange. My tensorflow 1.2 Version has the attribute tf.GraphKeys.REGULARIZATION_LOSSES
. (See output below).
As a workaround you can replace tf.GraphKeys.REGULARIZATION_LOSSES
by any string. The string 'regularization_losses'
would be an option. tf.GraphKeys.REGULARIZATION_LOSSES
appears 10 times in the code (see second output).
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
Type "copyright", "credits" or "license" for more information.
IPython 5.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import tensorflow as tf
In [2]: tf.GraphKeys.REGULARIZATION_LOSSES
Out[2]: 'regularization_losses'
In [3]: tf.__version__
Out[3]: '1.2.0'
In [4]:
>> ack tf.GraphKeys.REGULARIZATION_LOSSES
tensorflow-fcn/fcn32_vgg.py
259: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
282: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
362: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
tensorflow-fcn/fcn8_vgg.py
290: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
316: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
394: collection_name = tf.GraphKeys.REGULARIZATION_LOSSES
404: collection_name = tf.GraphKeys.REGULARIZATION_LOSSES
tensorflow-fcn/fcn16_vgg.py
274: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
297: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
377: tf.add_to_collection(tf.GraphKeys.REGULARIZATION_LOSSES,
from tensorflow-fcn.
Thanks for your reply!
I have solved the problem by reinstalling.
But I get another error like this.
2017-07-21 20:08:07.805898: W tensorflow/core/framework/op_kernel.cc:1158] Resource exhausted: OOM when allocating tensor with shape[1,4096,13,15]
Traceback (most recent call last):
File "test_fcn32_vgg.py", line 33, in
down, up = sess.run(tensors, feed_dict=feed_dict)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 789, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 997, in _run
feed_dict_string, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1132, in _do_run
target_list, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[1,4096,13,15]
[[Node: content_vgg/fc6/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](content_vgg/Print_4/_39, fc6/weights/read)]]
Caused by op u'content_vgg/fc6/Conv2D', defined at:
File "test_fcn32_vgg.py", line 24, in
vgg_fcn.build(batch_images, debug=True)
File "/home/sheldon/tensorflow-fcn-master/fcn32_vgg.py", line 97, in build
self.fc6 = self._fc_layer(self.pool5, "fc6")
File "/home/sheldon/tensorflow-fcn-master/fcn32_vgg.py", line 159, in _fc_layer
conv = tf.nn.conv2d(bottom, filt, [1, 1, 1, 1], padding='SAME')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_nn_ops.py", line 399, in conv2d
data_format=data_format, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2506, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1269, in init
self._traceback = _extract_stack()
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[1,4096,13,15]
[[Node: content_vgg/fc6/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](content_vgg/Print_4/_39, fc6/weights/read)]]
It seems like an out of memory error. I am a new to tensorflow. How could I solve it?
By the way, tensors = [vgg_fcn.pred, vgg_fcn.pred_up] this is mean to do what?
from tensorflow-fcn.
It seems like an out of memory error. I am a new to tensorflow. How could I solve it?
Use a GPU with more Memory. Or reduce batch size or reduce size or input image or do computation on cpu.
from tensorflow-fcn.
Related Issues (20)
- test_fcn32 fails, but test_fcn8 and test_fcn16 complete
- Test loss diverges during training nyud-fcn32s-color
- Memory error
- A problem about fcn8_vgg.py HOT 2
- Extend your get_deconv_filter from 2D to 3D. How?
- I train datasets "ADEChallengeData2016",But loss is almost the same HOT 3
- A problem about the deconvolution HOT 3
- A problem with fcn8_vgg.py
- An example of images with shape [None, h, w, 3]
- ValueError: No gradients provided for any variable
- The problem about fcn8_vgg.py
- is the vgg16.npy random weights or trained weights....?
- Max Tensor Size in FCN-16 and FCN-32
- What does the "use_dilated" mean in "build" function? HOT 1
- the kernel–size of upscore–layer(deconvolution) in fcn32s
- convert the ckpt model to movidius graph HOT 1
- Hello, could you tell me how to modify to achieve the effect in the article, you can run but the result is very poor.
- The weight decay (the regularization loss) is not applied for the fc_layer and upscore_layer
- What the speed it can reach?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-fcn.