Skip to content

The 'shape' in ReshapeOp is invalid. #3

Description

@Whyregister

I'm an AI newbie, may I ask what is the reason for the following error?

Traceback (most recent call last):
File "C:\ProgramData\miniconda3\lib\site-packages\qgui\base_tools.py", line 169, in new_func
func(obj)
File "D:\Paint-Master\run.py", line 38, in infer
im = infer_main(img_path, "inference/paint_best.pdparams", out_path, resize_h=512, resize_w=512)
File "D:\Paint-Master\inference\inference.py", line 100, in main
final_result = render_parallel.render_parallel(original_img, net_g, meta_brushes)
File "D:\Paint-Master\inference\render_parallel.py", line 226, in render_parallel
final_result = param2img_parallel(param, decision, meta_brushes, final_result)
File "D:\Paint-Master\inference\render_parallel.py", line 153, in param2img_parallel
canvas = partial_render(cur_canvas, even_idx_y, even_idx_x)
File "D:\Paint-Master\inference\render_parallel.py", line 140, in partial_render
selected_canvas_patch = selected_canvas_patch.reshape([0, 0, 0, 3, render_size_y, render_size_x])
File "C:\ProgramData\miniconda3\lib\site-packages\paddle\tensor\manipulation.py", line 5008, in reshape
out = _C_ops.reshape(x, new_shape)
ValueError: (InvalidArgument) The 'shape' in ReshapeOp is invalid. The input tensor X'size must be equal to the capacity of 'shape'. But received X's shape = [1, 2, 2, 2, 3, 256, 256], X's size = 1572864, 'shape' is [0, 0, 0, 3, 256, 256], the capacity of 'shape' is 786432.
[Hint: Expected capacity == in_size, but received capacity:786432 != in_size:1572864.] (at ..\paddle\phi\infermeta\unary.cc:2258)

None

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