Skip to content

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

@ChiuHsin

Description

@ChiuHsin

hi there
I am trying to start learning this code, however after i download and install everything I try to run your example code but I am getting this error, could you please point me out my mistake?

INFO:lib.nn_model.model:Initializing NN model with the following params: INFO:lib.nn_model.model:Input dimension: 256 (token vector size) INFO:lib.nn_model.model:Hidden dimension: 512 INFO:lib.nn_model.model:Output dimension: 20001 (token dict size) INFO:lib.nn_model.model:Input seq length: 16 INFO:lib.nn_model.model:Output seq length: 6 INFO:lib.nn_model.model:Batch size: 32 Traceback (most recent call last): File "bin/train.py", line 36, in <module> learn() File "bin/train.py", line 29, in learn nn_model = get_nn_model(token_dict_size=len(index_to_token)) File "/Users/xiao/WorkSpace/Dev/3rd/debug_seq2seq/lib/nn_model/model.py", line 29, in get_nn_model depth=1 File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/seq2seq/models.py", line 81, in SimpleSeq2Seq output = decoder(x) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/recurrentshop-1.0.0-py3.6.egg/recurrentshop/engine.py", line 452, in __call__ File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/recurrentshop-1.0.0-py3.6.egg/recurrentshop/engine.py", line 917, in num_states File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/recurrentshop-1.0.0-py3.6.egg/recurrentshop/engine.py", line 128, in num_states File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/recurrentshop-1.0.0-py3.6.egg/recurrentshop/cells.py", line 171, in build_model File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/keras/engine/base_layer.py", line 431, in __call__ self.build(unpack_singleton(input_shapes)) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/keras/layers/core.py", line 861, in build constraint=self.kernel_constraint) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper return func(*args, **kwargs) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/keras/engine/base_layer.py", line 252, in add_weight constraint=constraint) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 400, in variable v = tf.Variable(value, dtype=tf.as_dtype(dtype), name=name) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 235, in __init__ constraint=constraint) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/ops/variables.py", line 355, in _init_from_args initial_value, name="initial_value", dtype=dtype) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1014, in convert_to_tensor as_ref=False) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1104, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 235, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 214, in constant value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/Users/xiao/anaconda3/envs/dl/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 496, 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions