prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  KeyError: 'LinearHead is not in the head registry'
  use config
  ```python
  model = dict(
      head=dict(
          type='LinearHead',
          num_classes=1000,
          in_channels=2048,
          loss=dict(
              type='LabelSmoothLoss',
              loss_weight=1.0,
              label_smooth_val=0.1,
              num_classes=1000),
      ))
  ```
  
  got trackback
  ```python
  Traceback (most recent call last):
    File "/home/code/open_mmlab_codebase/huatian_bump_blur_cls/tools/train.py", line 177, in <module>
      main()
    File "/home/code/open_mmlab_codebase/huatian_bump_blur_cls/tools/train.py", line 151, in main
      model = build_classifier(cfg.model)
    File "/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py", line 38, in build_classifier
      return build(cfg, CLASSIFIERS)
    File "/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py", line 18, in build
      return build_from_cfg(cfg, registry, default_args)
    File "/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py", line 171, in build_from_cfg
      return obj_cls(**args)
    File "/home/code/open_mmlab_codebase/mmclassification/mmcls/models/classifiers/image.py", line 18, in __init__
      self.head = build_head(head)
    File "/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py", line 26, in build_head
      return build(cfg, HEADS)
    File "/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py", line 18, in build
      return build_from_cfg(cfg, registry, default_args)
    File "/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py", line 164, in build_from_cfg
      f'{obj_type} is not in the {registry.name} registry')
  KeyError: 'LinearHead is not in the head registry'
  ```
  
  __check /mmcls/models/heads/*.py, not exist `LinearHead` registered__
  
  </issue>
  <code>
  [start of configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py]
  1 _base_ = ['./resnet50_batch2048_warmup.py']
  2 model = dict(
  3     head=dict(
  4         type='LinearHead',
  5         num_classes=1000,
  6         in_channels=2048,
  7         loss=dict(
  8             type='LabelSmoothLoss',
  9             loss_weight=1.0,
  10             label_smooth_val=0.1,
  11             num_classes=1000),
  12     ))
  13
  [end of configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py]
  [start of configs/resnet/resnet50_b32x8_label_smooth_imagenet.py]
  1 _base_ = ['./resnet50_imagenet_bs256.py']
  2 model = dict(
  3     head=dict(
  4         type='LinearHead',
  5         num_classes=1000,
  6         in_channels=2048,
  7         loss=dict(
  8             type='LabelSmoothLoss',
  9             loss_weight=1.0,
  10             label_smooth_val=0.1,
  11             num_classes=1000),
  12     ))
  13
  [end of configs/resnet/resnet50_b32x8_label_smooth_imagenet.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py b/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py
  --- a/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py
  +++ b/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py
  @@ -1,7 +1,7 @@
   _base_ = ['./resnet50_imagenet_bs256.py']
   model = dict(
       head=dict(
  -        type='LinearHead',
  +        type='LinearClsHead',
           num_classes=1000,
           in_channels=2048,
           loss=dict(
  diff --git a/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py b/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py
  --- a/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py
  +++ b/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py
  @@ -1,7 +1,7 @@
   _base_ = ['./resnet50_batch2048_warmup.py']
   model = dict(
       head=dict(
  -        type='LinearHead',
  +        type='LinearClsHead',
           num_classes=1000,
           in_channels=2048,
           loss=dict(
  
verification_info: {"golden_diff": "diff --git a/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py b/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py\n--- a/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py\n+++ b/configs/resnet/resnet50_b32x8_label_smooth_imagenet.py\n@@ -1,7 +1,7 @@\n _base_ = ['./resnet50_imagenet_bs256.py']\n model = dict(\n     head=dict(\n-        type='LinearHead',\n+        type='LinearClsHead',\n         num_classes=1000,\n         in_channels=2048,\n         loss=dict(\ndiff --git a/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py b/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py\n--- a/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py\n+++ b/configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py\n@@ -1,7 +1,7 @@\n _base_ = ['./resnet50_batch2048_warmup.py']\n model = dict(\n     head=dict(\n-        type='LinearHead',\n+        type='LinearClsHead',\n         num_classes=1000,\n         in_channels=2048,\n         loss=dict(\n", "issue": "KeyError: 'LinearHead is not in the head registry'\nuse config\r\n```python\r\nmodel = dict(\r\n    head=dict(\r\n        type='LinearHead',\r\n        num_classes=1000,\r\n        in_channels=2048,\r\n        loss=dict(\r\n            type='LabelSmoothLoss',\r\n            loss_weight=1.0,\r\n            label_smooth_val=0.1,\r\n            num_classes=1000),\r\n    ))\r\n```\r\n\r\ngot trackback\r\n```python\r\nTraceback (most recent call last):\r\n  File \"/home/code/open_mmlab_codebase/huatian_bump_blur_cls/tools/train.py\", line 177, in <module>\r\n    main()\r\n  File \"/home/code/open_mmlab_codebase/huatian_bump_blur_cls/tools/train.py\", line 151, in main\r\n    model = build_classifier(cfg.model)\r\n  File \"/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py\", line 38, in build_classifier\r\n    return build(cfg, CLASSIFIERS)\r\n  File \"/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py\", line 18, in build\r\n    return build_from_cfg(cfg, registry, default_args)\r\n  File \"/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py\", line 171, in build_from_cfg\r\n    return obj_cls(**args)\r\n  File \"/home/code/open_mmlab_codebase/mmclassification/mmcls/models/classifiers/image.py\", line 18, in __init__\r\n    self.head = build_head(head)\r\n  File \"/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py\", line 26, in build_head\r\n    return build(cfg, HEADS)\r\n  File \"/home/code/open_mmlab_codebase/mmclassification/mmcls/models/builder.py\", line 18, in build\r\n    return build_from_cfg(cfg, registry, default_args)\r\n  File \"/opt/conda/lib/python3.7/site-packages/mmcv/utils/registry.py\", line 164, in build_from_cfg\r\n    f'{obj_type} is not in the {registry.name} registry')\r\nKeyError: 'LinearHead is not in the head registry'\r\n```\r\n\r\n__check /mmcls/models/heads/*.py, not exist `LinearHead` registered__\n", "before_files": [{"content": "_base_ = ['./resnet50_batch2048_warmup.py']\nmodel = dict(\n    head=dict(\n        type='LinearHead',\n        num_classes=1000,\n        in_channels=2048,\n        loss=dict(\n            type='LabelSmoothLoss',\n            loss_weight=1.0,\n            label_smooth_val=0.1,\n            num_classes=1000),\n    ))\n", "path": "configs/resnet/resnet50_b64x32_warmup_label_smooth_imagenet.py"}, {"content": "_base_ = ['./resnet50_imagenet_bs256.py']\nmodel = dict(\n    head=dict(\n        type='LinearHead',\n        num_classes=1000,\n        in_channels=2048,\n        loss=dict(\n            type='LabelSmoothLoss',\n            loss_weight=1.0,\n            label_smooth_val=0.1,\n            num_classes=1000),\n    ))\n", "path": "configs/resnet/resnet50_b32x8_label_smooth_imagenet.py"}]}