Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fluid.layers.reshape BUG #10642

Closed
BigFishMaster opened this issue May 14, 2018 · 0 comments
Closed

fluid.layers.reshape BUG #10642

BigFishMaster opened this issue May 14, 2018 · 0 comments
Assignees

Comments

@BigFishMaster
Copy link
Contributor

I use reshape operator to reshape my input layer. But meet the following bug:

Traceback (most recent call last):
  File "se_resnext_metric.py", line 339, in <module>
    layers=layers)
  File "se_resnext_metric.py", line 204, in train
    cost = triplet_loss(input=out, margin = 0.1)
  File "se_resnext_metric.py", line 117, in triplet_loss
    output = fluid.layers.reshape(input, shape = [-1, 3, 1000])
  File "/home/ssd1/yancanxiang/code_paddle/code_metric/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 3415, in reshape
    outputs={"Out": reshaped})
  File "/home/ssd1/yancanxiang/code_paddle/code_metric/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 45, in append_op
    return self.main_program.current_block().append_op(*args, **kwargs)
  File "/home/ssd1/yancanxiang/code_paddle/code_metric/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/framework.py", line 816, in append_op
    op = Operator(block=self, desc=op_desc, *args, **kwargs)
  File "/home/ssd1/yancanxiang/code_paddle/code_metric/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/framework.py", line 494, in __init__
    self.desc.infer_shape(self.block.desc)
paddle.fluid.core.EnforceNotMet: enforce output_shape[unk_dim_idx] * capacity == -in_size failed, 0 != 1000
Invalid shape is given. at [/paddle/paddle/fluid/operators/reshape_op.h:94]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants