Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Apr 8, 2024
1 parent 596ab13 commit 8711dd4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/layer/vulkan/priorbox_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int PriorBox_vulkan::forward(const std::vector<VkMat>& bottom_blobs, std::vector
int w = bottom_blobs[0].w;
int h = bottom_blobs[0].h;

if (bottom_blobs.size() == 1 && image_width == -233 && image_height == -233 && max_sizes.empty())
if (bottom_blobs.size() == 1 && image_width == -233 && image_height == -233 && max_sizes_gpu.empty())
{
// mxnet style _contrib_MultiBoxPrior
float step_w = step_width;
Expand All @@ -154,8 +154,8 @@ int PriorBox_vulkan::forward(const std::vector<VkMat>& bottom_blobs, std::vector
if (step_h == -233)
step_h = 1.f / (float)h;

int num_sizes = min_sizes.w;
int num_ratios = aspect_ratios.w;
int num_sizes = min_sizes_gpu.w;
int num_ratios = aspect_ratios_gpu.w;

int num_prior = num_sizes - 1 + num_ratios;

Expand Down Expand Up @@ -207,9 +207,9 @@ int PriorBox_vulkan::forward(const std::vector<VkMat>& bottom_blobs, std::vector
if (step_h == -233)
step_h = (float)image_h / h;

int num_min_size = min_sizes.w;
int num_max_size = max_sizes.w;
int num_aspect_ratio = aspect_ratios.w;
int num_min_size = min_sizes_gpu.w;
int num_max_size = max_sizes_gpu.w;
int num_aspect_ratio = aspect_ratios_gpu.w;

int num_prior = num_min_size * num_aspect_ratio + num_min_size + num_max_size;
if (flip)
Expand Down

0 comments on commit 8711dd4

Please sign in to comment.