Related code:
search = patch_crop - config.net_average_image response = net(torch.Tensor(search).cuda()) peak, idx = torch.max(response.view(config.num_scale, -1), 1) peak = peak.data.cpu().numpy() * config.scale_penalties best_scale = np.argmax(peak) r_max, c_max = np.unravel_index(idx[best_scale], config.net_input_size)
The error described in the title is in the lase line.
i don't know why it was still wrong.
Related code:
search = patch_crop - config.net_average_image response = net(torch.Tensor(search).cuda()) peak, idx = torch.max(response.view(config.num_scale, -1), 1) peak = peak.data.cpu().numpy() * config.scale_penalties best_scale = np.argmax(peak) r_max, c_max = np.unravel_index(idx[best_scale], config.net_input_size)
The error described in the title is in the lase line. i don't know why it was still wrong.