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

TypeError: crop_and_resize_forward expected 7 arguments, got 8 when running on cpu #126

Open
themantalope opened this issue Jun 1, 2021 · 0 comments

Comments

@themantalope
Copy link

Hi,

I'm trying to troubleshoot some cryptic errors when running on cuda, so I tried to run everything on the CPU. However, there is an issue with the implementation of crop_and_resize for the CPU:

Here is the declaration in crop_and_resize.h (for the cpu):

void crop_and_resize_forward(
    THFloatTensor * image,
    THFloatTensor * boxes,      // [y1, x1, y2, x2]
    THIntTensor * box_index,    // range in [0, batch_size)
    const float extrapolation_value,
    const int crop_height,
    const int crop_width,
    THFloatTensor * crops
);

Likewise for the GPU:

void crop_and_resize_gpu_forward(
    THCudaTensor * image,
    THCudaTensor * boxes,           // [y1, x1, y2, x2]
    THCudaIntTensor * box_index,    // range in [0, batch_size)
    const float extrapolation_value,
    const int crop_height,
    const int crop_width,
    const int crop_zdepth,
    THCudaTensor * crops
);

In the CPU implementation, there is no const int crop_zdepth parameter - thus the rest of the code breaks down when trying to run this with the mrcnn network model. I do not have anywhere near enough experience to fix the cpu function, but I thought I'd bring it up.

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

1 participant