Skip to content

single channel images? seems not to like c_dim = 1 #59

@varoudis

Description

@varoudis

Any ideas regarding running the code with single channel PNGs?

2017-10-16 12:35:54.068937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-10-16 12:35:54.068969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-10-16 12:35:54.069003: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K80, pci bus id: 0000:87:00.0)
Traceback (most recent call last):
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 671, in _call_cpp_shape_fn_impl
input_tensors_as_shapes, status)
File "/opt/conda/lib/python3.5/contextlib.py", line 66, in exit
next(self.gen)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot reshape a tensor with 786432 elements to shape [64,8,8,8,8,1] (262144 elements) for 'Reshape_1' (op: 'Reshape') with input shapes: [64,64,64,3], [6] and with input tensors computed as partial shapes: input[1] = [64,8,8,8,8,1].

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./train-dcgan.py", line 39, in
is_crop=False, checkpoint_dir=FLAGS.checkpoint_dir)
File "/root/mydocs/VMWork2016/Tests/dcgan-completion.tensorflow/model.py", line 81, in init
self.build_model()
File "/root/mydocs/VMWork2016/Tests/dcgan-completion.tensorflow/model.py", line 98, in build_model
self.lowres_size, self.lowres, self.c_dim]), [2, 4])
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/ops/gen_array_ops.py", line 2451, in reshape
name=name)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 2508, in create_op
set_shapes_for_outputs(ret)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1873, in set_shapes_for_outputs
shapes = shape_func(op)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 1823, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/opt/conda/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Cannot reshape a tensor with 786432 elements to shape [64,8,8,8,8,1] (262144 elements) for 'Reshape_1' (op: 'Reshape') with input shapes: [64,64,64,3], [6] and with input tensors computed as partial shapes: input[1] = [64,8,8,8,8,1].

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