Skip to content

InvalidArgumentError: Incompatible shapes: [100,24,24,1] vs. [100,10,10,1] #10

Description

@akashcmd

Hi @tjvandal and other collaborators,
I tried to run bash run_job.sh but it showed this same error. I am stuck with this error since a week now and am not able to find a solution to it. Could you please help me urgently.

image

Note : The data is downloaded successfully and completely. I have the following files and the files in scratch folder.
image

Error

Exception has occurred: InvalidArgumentError
Incompatible shapes: [100,24,24,1] vs. [100,10,10,1]
	 [[Node: loss/sub = Sub[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](hidden_2/conv2d/BiasAdd, loss/cond/Merge)]]

Caused by op u'loss/sub', defined at:
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/akashcmd/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
    cli.main()
  File "/Users/akashcmd/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
    run()
  File "/Users/akashcmd/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/runpy.py", line 252, in run_path
    return _run_module_code(code, init_globals, run_name, path_name)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/akashcmd/Projects/deepsd/train.py", line 157, in <module>
    train()
  File "/Users/akashcmd/Projects/deepsd/train.py", line 97, in train
    is_training=is_training)
  File "/Users/akashcmd/Projects/deepsd/srcnn-tensorflow/srcnn/srcnn.py", line 47, in __init__
    self._build_graph()
  File "/Users/akashcmd/Projects/deepsd/srcnn-tensorflow/srcnn/srcnn.py", line 114, in _build_graph
    self.loss = self._loss(_prediction_norm)
  File "/Users/akashcmd/Projects/deepsd/srcnn-tensorflow/srcnn/srcnn.py", line 83, in _loss
    err = tf.square(predictions - _y)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 894, in binary_op_wrapper
    return func(x, y, name=name)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 4636, in _sub
    "Sub", x=x, y=y, name=name)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
    op_def=op_def)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2956, in create_op
    op_def=op_def)
  File "/opt/anaconda3/envs/reaps27/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1470, in __init__
    self._traceback = self._graph._extract_stack()  # pylint: disable=protected-access

InvalidArgumentError (see above for traceback): Incompatible shapes: [100,24,24,1] vs. [100,10,10,1]
	 [[Node: loss/sub = Sub[T=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](hidden_2/conv2d/BiasAdd, loss/cond/Merge)]]
  File "/Users/akashcmd/Projects/deepsd/train.py", line 135, in train
    feed_dict=feed_dict(True))
  File "/Users/akashcmd/Projects/deepsd/train.py", line 157, in <module>
    train()

Steps to Reproduce

  1. Run prism.py with python 2.7 and download the required files
  2. Run bash run_job.sh

Reopening Issue : #8

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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