tensorflow / tensorflow/privacy

ValueError: Dimension size must be evenly divisible by 1048576 but is 1 for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](Mean, Reshape/shape)' with input shapes: [?,1024,1024], [0].

Open
#406 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
477
Avg merge
22h 12m
Merged PRs (30d)
1

Description

Output exceeds the size limit. Open the full output data in a text editor

InvalidArgumentError Traceback (most recent call last)
c:\Users\XR\anaconda3\envs\tensorflowgpu_new2\lib\site-packages\tensorflow\python\framework\ops.py in _create_c_op(graph, node_def, inputs, control_inputs, op_def)
1811 try:
-> 1812 c_op = pywrap_tf_session.TF_FinishOperation(op_desc)
...
-> 1815 raise ValueError(str(e))
1816
1817 return c_op

ValueError: Dimension size must be evenly divisible by 1048576 but is 1 for '{{node Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32](Mean, Reshape/shape)' with input shapes: [?,1024,1024], [0].


My dataset is a tfrecord file with image sizes (1024,1024,1).
An error occurs while loading this tfrecord file using estimator and trying to train and evaluate it.

When I use the 'tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)' function, I get an error like the title, but I don't know why.

I'd be grateful if you could tell me how to fix this error.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the tf.estimator.train_and_evaluate entry point and inspect the estimator input pipeline that reads the TFRecord images shaped (1024,1024,1). Trace the Reshape operation receiving the Mean tensor and verify the shape passed during both training and evaluation. Done means the reported reshape error is reproduced and the pipeline handles the dataset shape without failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.