tensorflow: Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT

@lukaszkaiser I am facing the same problem. I have same specification as the previous one. My code is Final_dataset.csv contains 456 X 147457

`train = pd.read_csv('Final_dataset.csv')
 x = tf.placeholder(tf.float32, shape=[None, 128*128*3])
 y_ = tf.placeholder(tf.float32, shape=[None, 128*256*3])
 W = tf.Variable(tf.zeros([128*128*3,128*256*3]))
 b = tf.Variable(tf.zeros([128*256*3]))`

Whenever I run below command sess.run(tf.global_variables_initializer())

I am getting this error

`W tensorflow/core/framework/op_kernel.cc:965] Invalid argument: Cannot parse tensor from proto:    dtype: DT_FLOAT
  tensor_shape {
      dim {
         size: 49152
      }
      dim {
         size: 98304
      }
  }
  float_val: 0

  E tensorflow/core/common_runtime/executor.cc:390] Executor failed to create kernel. Invalid argument: Cannot parse tensor from proto: dtype: DT_FLOAT
  tensor_shape {
     dim {
        size: 49152
     }
    dim {
        size: 98304
    }
 }
float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]
   Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 766, in run
run_metadata_ptr)
     File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 964, in _run
feed_dict_string, options, run_metadata)
    File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1014, in _do_run
target_list, options, run_metadata)
   File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
 tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot parse tensor from proto: dtype: DT_FLOAT
 tensor_shape {
   dim {
      size: 49152
    }
    dim {
        size: 98304
    }
 }
  float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Caused by op u'zeros_2', defined at:
File "<stdin>", line 1, in <module>
File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1437, in zeros
output = constant(zero, shape=shape, dtype=dtype, name=name)
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 169, in constant
attrs={"value": tensor_value, "dtype": dtype_value}, name=name).outputs[0]
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
 File "/home/lokesh/.local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1128, in __init__
self._traceback = _extract_stack()

InvalidArgumentError (see above for traceback): Cannot parse tensor from proto: dtype: DT_FLOAT
tensor_shape {
 dim {
    size: 49152
 }
 dim {
   size: 98304
 }
 }
 float_val: 0

 [[Node: zeros_2 = Const[dtype=DT_FLOAT, value=<Invalid TensorProto: dtype: DT_FLOAT tensor_shape { dim { size: 49152 } dim { size: 98304 } } float_val: 0>, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

`

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 25 (7 by maintainers)

Most upvoted comments

Same problem here.

Windows 10 x64, Python 3.5.2, TF 1.4.0, 8Gb RAM

I experienced the same issue. Reducing vector size solved the problem, alternatively one can try machine with more RAM.