Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Cannot create a tensor proto whose content is larger than 2GB. #28

Open
ycheng-sec opened this issue Mar 16, 2018 · 7 comments

Comments

@ycheng-sec
Copy link

I ran into the following issue when using the custom s2s attention layer. (Keras 2.1.3 and python3.6.1). Anyone can help?

File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/legacy/layers.py", line 968, in call
return super(Recurrent, self).call(inputs, **kwargs)
File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/engine/topology.py", line 590, in call
self.build(input_shapes[0])
File "attention/custom_recurrents.py", line 180, in build
constraint=self.recurrent_constraint)
File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/engine/topology.py", line 414, in add_weight
constraint=constraint)
File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 392, in variable
v = tf.Variable(value, dtype=tf.as_dtype(dtype), name=name)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 197, in init
expected_shape=expected_shape)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 285, in _init_from_args
initial_value, name="initial_value", dtype=dtype)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 637, in convert_to_tensor
as_ref=False)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 702, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 110, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 99, in constant
tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
File "/apps/python/3.6.1/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 430, in make_tensor_proto
"Cannot create a tensor proto whose content is larger than 2GB.")
ValueError: Cannot create a tensor proto whose content is larger than 2GB.

@ghost
Copy link

ghost commented Jun 4, 2018

@Candyao i am getting the same error.Is it resolved ?

@ghost
Copy link

ghost commented Jun 4, 2018

@zafarali Any updates on this.

@vajja
Copy link

vajja commented Jul 4, 2018

How can we come around this case?

@keshavunni
Copy link

@KushalDave
Copy link

Hi, did the above solution help? I am not able to get it working?

@vajja
Copy link

vajja commented Jan 8, 2019 via email

@javedqadruddin
Copy link

I found this helpful when running into this problem in the context of using a tf dataset: https://www.tensorflow.org/guide/datasets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants