Repository: pytorch
Issue: `torch.export` for Yolo Pose fails
Labels: oncall: pt2,module: dynamic shapes,module: dynamo,oncall: export

### 🐛 Describe the bug

I get an error when I try to export the Yolo-Pose model with `strict=True`

The error goes away with `strict=False`

`pip install ultralytics`

```
from ultralytics import YOLO
import torch
from torch.export import export
pose_model = YOLO("yolo11n-pose.pt")  # Load model
pose_model.model.eval()
inputs = torch.rand((1,3,640,640))
exported_program: torch.export.ExportedProgram= export(pose_model.model, args=(inputs,))
```

Error Logs

```
Traceback (most recent call last):
  File "/home/agunapal/export_games/pose/pose_export.py", line 7, in <module>
    exported_program: torch.export.ExportedProgram= export(pose_model.model, args=(inputs,))
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/__init__.py", line 368, in export
    return _export(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 1031, in wrapper
    raise e
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 1004, in wrapper
    ep = fn(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/exported_program.py", line 122, in wrapper
    return fn(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 1957, in _export
    export_artifact = export_func(  # type: ignore[operator]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 1251, in _strict_export
    return _strict_export_lower_to_aten_ir(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 1279, in _strict_export_lower_to_aten_ir
    gm_torch_level = _export_to_torch_ir(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/export/_trace.py", line 660, in _export_to_torch_ir
    gm_torch_level, _ = torch._dynamo.export(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 1539, in inner
    result_traced = opt_f(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1740, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 556, in _fn
    return fn(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1740, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1395, in __call__
    return self._torchdynamo_orig_callable(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 545, in __call__
    return _compile(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1027, in _compile
    raise InternalTorchDynamoError(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 977, in _compile
    guarded_code = compile_inner(code, one_graph, hooks, transform)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 706, in compile_inner
    return _compile_inner(code, one_graph, hooks, transform)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_utils_internal.py", line 95, in wrapper_function
    return function(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 741, in _compile_inner
    out_code = transform_code_object(code, transform)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1348, in transform_code_object
    transformations(instructions, code_options)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 229, in _fn
    return fn(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 658, in transform
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2912, in run
    super().run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1816, in CALL_FUNCTION_EX
    self.call_function(fn, argsvars.items, kwargsvars)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 410, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1738, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 410, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1738, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/nn_module.py", line 442, in call_function
    return tx.inline_user_function_return(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1816, in CALL_FUNCTION_EX
    self.call_function(fn, argsvars.items, kwargsvars)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 410, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1738, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1738, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 410, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1738, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 349, in call_function
    return super().call_function(tx, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 125, in call_function
    return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 973, in inline_user_function_return
    return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3127, in inline_call
    return cls.inline_call_(parent, func, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3255, in inline_call_
    tracer.run()
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1120, in run
    while self.step():
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1032, in step
    self.dispatch_table[inst.opcode](self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 640, in wrapper
    return inner_fn(self, inst)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1828, in CALL_FUNCTION_KW
    self.call_function(fn, args, kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 967, in call_function
    self.push(fn.call_function(self, args, kwargs))  # type: ignore[arg-type]
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/torch.py", line 953, in call_function
    tensor_variable = wrap_fx_proxy(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2108, in wrap_fx_proxy
    return wrap_fx_proxy_cls(target_cls=TensorVariable, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2174, in wrap_fx_proxy_cls
    return _wrap_fx_proxy(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2272, in _wrap_fx_proxy
    return handle_traced_output(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2291, in handle_traced_output
    set_example_value(proxy.node, example_value)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1640, in set_example_value
    if symbol_to_path := torch.fx.experimental.symbolic_shapes.compute_unbacked_bindings(
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/fx/experimental/symbolic_shapes.py", line 999, in compute_unbacked_bindings
    raise PendingUnbackedSymbolNotFound(
torch._dynamo.exc.InternalTorchDynamoError: PendingUnbackedSymbolNotFound: Pending unbacked symbols {zuf0} not in returned outputs FakeTensor(..., size=(6400, 1)) ((1, 1), 0).
Did you accidentally call new_dynamic_size() or item() more times than you needed to in your fake implementation?
For more help, see https://docs.google.com/document/d/1RWrH-3wLEpzR9kCS6gGBNen_-Fs-8PVbWWFE5AcgeWE/edit

from user code:
   File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/tasks.py", line 112, in forward
    return self.predict(x, *args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/tasks.py", line 130, in predict
    return self._predict_once(x, profile, visualize, embed)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/tasks.py", line 151, in _predict_once
    x = m(x)  # run
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/modules/head.py", line 240, in forward
    x = Detect.forward(self, x)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/modules/head.py", line 72, in forward
    y = self._inference(x)
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/nn/modules/head.py", line 105, in _inference
    self.anchors, self.strides = (x.transpose(0, 1) for x in make_anchors(x, self.stride, 0.5))
  File "/home/agunapal/anaconda3/envs/export/lib/python3.10/site-packages/ultralytics/utils/tal.py", line 314, in make_anchors
    stride_tensor.append(torch.full((h * w, 1), stride, dtype=dtype, device=device))
```

### Versions

```
Collecting environment information...
PyTorch version: 2.6.0.dev20241112+cu121
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: CentOS Stream 9 (x86_64)
GCC version: (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2)
Clang version: Could not collect
CMake version: version 3.26.5
Libc version: glibc-2.34

Python version: 3.10.0 (default, Mar  3 2022, 09:58:08) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.12.0-0_fbk16_zion_7661_geb00762ce6d2-x86_64-with-glibc2.34
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: 
GPU 0: NVIDIA PG509-210
GPU 1: NVIDIA PG509-210
GPU 2: NVIDIA PG509-210
GPU 3: NVIDIA PG509-210
GPU 4: NVIDIA PG509-210
GPU 5: NVIDIA PG509-210
GPU 6: NVIDIA PG509-210
GPU 7: NVIDIA PG509-210

Nvidia driver version: 525.105.17
cuDNN version: Probably one of the following:
/usr/lib64/libcudnn.so.8.8.0
/usr/lib64/libcudnn.so.9.1.0
/usr/lib64/libcudnn_adv.so.9.1.0
/usr/lib64/libcudnn_adv_infer.so.8.8.0
/usr/lib64/libcudnn_adv_train.so.8.8.0
/usr/lib64/libcudnn_cnn.so.9.1.0
/usr/lib64/libcudnn_cnn_infer.so.8.8.0
/usr/lib64/libcudnn_cnn_train.so.8.8.0
/usr/lib64/libcudnn_engines_precompiled.so.9.1.0
/usr/lib64/libcudnn_engines_runtime_compiled.so.9.1.0
/usr/lib64/libcudnn_graph.so.9.1.0
/usr/lib64/libcudnn_heuristic.so.9.1.0
/usr/lib64/libcudnn_ops.so.9.1.0
/usr/lib64/libcudnn_ops_infer.so.8.8.0
/usr/lib64/libcudnn_ops_train.so.8.8.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Address sizes:                   46 bits physical, 48 bits virtual
Byte Order:                      Little Endian
CPU(s):                          192
On-line CPU(s) list:             0-191
Vendor ID:                       GenuineIntel
Model name:                      Intel(R) Xeon(R) Platinum 8339HC CPU @ 1.80GHz
CPU family:                      6
Model:                           85
Thread(s) per core:              2
Core(s) per socket:              24
Socket(s):                       4
Stepping:                        11
Frequency boost:                 enabled
CPU(s) scaling MHz:              100%
CPU max MHz:                     1801.0000
CPU min MHz:                     800.0000
BogoMIPS:                        3600.00
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local avx512_bf16 dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Virtualization:                  VT-x
L1d cache:                       3 MiB (96 instances)
L1i cache:                       3 MiB (96 instances)
L2 cache:                        96 MiB (96 instances)
L3 cache:                        132 MiB (4 instances)
NUMA node(s):                    4
NUMA node0 CPU(s):               0-23,96-119
NUMA node1 CPU(s):               24-47,120-143
NUMA node2 CPU(s):               48-71,144-167
NUMA node3 CPU(s):               72-95,168-191
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Not affected
Vulnerability Meltdown:          Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Enhanced IBRS, IBPB conditional, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected

Versions of relevant libraries:
[pip3] numpy==2.0.2
[pip3] nvidia-cublas-cu12==12.1.3.1
[pip3] nvidia-cuda-cupti-cu12==12.1.105
[pip3] nvidia-cuda-nvrtc-cu12==12.1.105
[pip3] nvidia-cuda-runtime-cu12==12.1.105
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.0.2.54
[pip3] nvidia-curand-cu12==10.3.2.106
[pip3] nvidia-cusolver-cu12==11.4.5.107
[pip3] nvidia-cusparse-cu12==12.1.0.106
[pip3] nvidia-cusparselt-cu12==0.6.2
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.1.105
[pip3] nvidia-nvtx-cu12==12.1.105
[pip3] pytorch-triton==3.1.0+cf34004b8a
[pip3] torch==2.6.0.dev20241112+cu121
[pip3] torchaudio==2.5.0.dev20241112+cu121
[pip3] torchvision==0.20.0.dev20241112+cu121
[conda] numpy                     2.0.2                    pypi_0    pypi
[conda] nvidia-cublas-cu12        12.1.3.1                 pypi_0    pypi
[conda] nvidia-cuda-cupti-cu12    12.1.105                 pypi_0    pypi
[conda] nvidia-cuda-nvrtc-cu12    12.1.105                 pypi_0    pypi
[conda] nvidia-cuda-runtime-cu12  12.1.105                 pypi_0    pypi
[conda] nvidia-cudnn-cu12         9.1.0.70                 pypi_0    pypi
[conda] nvidia-cufft-cu12         11.0.2.54                pypi_0    pypi
[conda] nvidia-curand-cu12        10.3.2.106               pypi_0    pypi
[conda] nvidia-cusolver-cu12      11.4.5.107               pypi_0    pypi
[conda] nvidia-cusparse-cu12      12.1.0.106               pypi_0    pypi
[conda] nvidia-cusparselt-cu12    0.6.2                    pypi_0    pypi
[conda] nvidia-nccl-cu12          2.21.5                   pypi_0    pypi
[conda] nvidia-nvjitlink-cu12     12.1.105                 pypi_0    pypi
[conda] nvidia-nvtx-cu12          12.1.105                 pypi_0    pypi
[conda] pytorch-triton            3.1.0+cf34004b8a          pypi_0    pypi
[conda] torch                     2.6.0.dev20241112+cu121          pypi_0    pypi
[conda] torchaudio                2.5.0.dev20241112+cu121          pypi_0    pypi
[conda] torchvision               0.20.0.dev20241112+cu121          pypi_0    pypi
```

cc @chauhang @penguinwu @ezyang @bobrenjc93 @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4