x = torch.tensor([[[-0.0744, -0.0904]],
[[-0.0452, -0.0386]],
[[-0.0187, -0.0100]],
[[-0.0060, 0.0100]],
[[-0.0660, -0.1066]],
[[-0.0289, -0.0087]],
[[-0.0227, -0.0159]],
[[-0.0547, -0.0428]],
[[-0.0941, -0.0747]],
[[-0.0653, -0.0478]],
[[-0.0747, -0.0417]],
[[-0.0740, -0.0367]]], dtype=torch.float64, requires_grad=True)
yield gradients with Nans for budget_bisect with budget =2. If we squeeze the singleton dimention gradients are correct.