prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  an unexpected keyword argument 'drop_out_ratio' when using config file ocrnet_r50-d8.py
  **Describe the bug**
  
  It seems that there is a small error in the config file: 
  https://github.com/open-mmlab/mmsegmentation/blob/381eacb9a5e0e8eb475e456845f1d4c55f3c0339/configs/_base_/models/ocrnet_r50-d8.py#L26
  and
  https://github.com/open-mmlab/mmsegmentation/blob/381eacb9a5e0e8eb475e456845f1d4c55f3c0339/configs/_base_/models/ocrnet_r50-d8.py#L38
  
  **Error traceback**
  
  ```
  Traceback (most recent call last):
    File "./tools/train.py", line 161, in <module>
      main()
    File "./tools/train.py", line 131, in main
      cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)
    File "/root/userfolder/mmsegmentation/mmseg/models/builder.py", line 56, in build_segmentor
      return build(cfg, SEGMENTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))
    File "/root/userfolder/mmsegmentation/mmseg/models/builder.py", line 31, in build
      return build_from_cfg(cfg, registry, default_args)
    File "/root/userfolder/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 171, in build_from_cfg
      return obj_cls(**args)
    File "/root/userfolder/mmsegmentation/mmseg/models/segmentors/cascade_encoder_decoder.py", line 36, in __init__
      pretrained=pretrained)
    File "/root/userfolder/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py", line 34, in __init__
      self._init_decode_head(decode_head)
    File "/root/userfolder/mmsegmentation/mmseg/models/segmentors/cascade_encoder_decoder.py", line 44, in _init_decode_head
      self.decode_head.append(builder.build_head(decode_head[i]))
    File "/root/userfolder/mmsegmentation/mmseg/models/builder.py", line 46, in build_head
      return build(cfg, HEADS)
    File "/root/userfolder/mmsegmentation/mmseg/models/builder.py", line 31, in build
      return build_from_cfg(cfg, registry, default_args)
    File "/root/userfolder/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py", line 171, in build_from_cfg
      return obj_cls(**args)
    File "/root/userfolder/mmsegmentation/mmseg/models/decode_heads/fcn_head.py", line 31, in __init__
      super(FCNHead, self).__init__(**kwargs)
  TypeError: __init__() got an unexpected keyword argument 'drop_out_ratio'
  ```
  
  **Bug fix**
  change the keyword `drop_out_ratio=0.1` to `dropout_ratio=0.1` will fix this.
  
  
  
  </issue>
  <code>
  [start of configs/_base_/models/ocrnet_r50-d8.py]
  1 # model settings
  2 norm_cfg = dict(type='SyncBN', requires_grad=True)
  3 model = dict(
  4     type='CascadeEncoderDecoder',
  5     num_stages=2,
  6     pretrained='open-mmlab://resnet50_v1c',
  7     backbone=dict(
  8         type='ResNetV1c',
  9         depth=50,
  10         num_stages=4,
  11         out_indices=(0, 1, 2, 3),
  12         dilations=(1, 1, 2, 4),
  13         strides=(1, 2, 1, 1),
  14         norm_cfg=norm_cfg,
  15         norm_eval=False,
  16         style='pytorch',
  17         contract_dilation=True),
  18     decode_head=[
  19         dict(
  20             type='FCNHead',
  21             in_channels=1024,
  22             in_index=2,
  23             channels=256,
  24             num_convs=1,
  25             concat_input=False,
  26             drop_out_ratio=0.1,
  27             num_classes=19,
  28             norm_cfg=norm_cfg,
  29             align_corners=False,
  30             loss_decode=dict(
  31                 type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),
  32         dict(
  33             type='OCRHead',
  34             in_channels=2048,
  35             in_index=3,
  36             channels=512,
  37             ocr_channels=256,
  38             drop_out_ratio=0.1,
  39             num_classes=19,
  40             norm_cfg=norm_cfg,
  41             align_corners=False,
  42             loss_decode=dict(
  43                 type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0))
  44     ])
  45 # model training and testing settings
  46 train_cfg = dict()
  47 test_cfg = dict(mode='whole')
  48
  [end of configs/_base_/models/ocrnet_r50-d8.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/_base_/models/ocrnet_r50-d8.py b/configs/_base_/models/ocrnet_r50-d8.py
  --- a/configs/_base_/models/ocrnet_r50-d8.py
  +++ b/configs/_base_/models/ocrnet_r50-d8.py
  @@ -23,7 +23,7 @@
               channels=256,
               num_convs=1,
               concat_input=False,
  -            drop_out_ratio=0.1,
  +            dropout_ratio=0.1,
               num_classes=19,
               norm_cfg=norm_cfg,
               align_corners=False,
  @@ -35,7 +35,7 @@
               in_index=3,
               channels=512,
               ocr_channels=256,
  -            drop_out_ratio=0.1,
  +            dropout_ratio=0.1,
               num_classes=19,
               norm_cfg=norm_cfg,
               align_corners=False,
  
verification_info: {"golden_diff": "diff --git a/configs/_base_/models/ocrnet_r50-d8.py b/configs/_base_/models/ocrnet_r50-d8.py\n--- a/configs/_base_/models/ocrnet_r50-d8.py\n+++ b/configs/_base_/models/ocrnet_r50-d8.py\n@@ -23,7 +23,7 @@\n             channels=256,\n             num_convs=1,\n             concat_input=False,\n-            drop_out_ratio=0.1,\n+            dropout_ratio=0.1,\n             num_classes=19,\n             norm_cfg=norm_cfg,\n             align_corners=False,\n@@ -35,7 +35,7 @@\n             in_index=3,\n             channels=512,\n             ocr_channels=256,\n-            drop_out_ratio=0.1,\n+            dropout_ratio=0.1,\n             num_classes=19,\n             norm_cfg=norm_cfg,\n             align_corners=False,\n", "issue": "an unexpected keyword argument 'drop_out_ratio' when using config file ocrnet_r50-d8.py\n**Describe the bug**\r\n\r\nIt seems that there is a small error in the config file: \r\nhttps://github.com/open-mmlab/mmsegmentation/blob/381eacb9a5e0e8eb475e456845f1d4c55f3c0339/configs/_base_/models/ocrnet_r50-d8.py#L26\r\nand\r\nhttps://github.com/open-mmlab/mmsegmentation/blob/381eacb9a5e0e8eb475e456845f1d4c55f3c0339/configs/_base_/models/ocrnet_r50-d8.py#L38\r\n\r\n**Error traceback**\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"./tools/train.py\", line 161, in <module>\r\n    main()\r\n  File \"./tools/train.py\", line 131, in main\r\n    cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/builder.py\", line 56, in build_segmentor\r\n    return build(cfg, SEGMENTORS, dict(train_cfg=train_cfg, test_cfg=test_cfg))\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/builder.py\", line 31, in build\r\n    return build_from_cfg(cfg, registry, default_args)\r\n  File \"/root/userfolder/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py\", line 171, in build_from_cfg\r\n    return obj_cls(**args)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/segmentors/cascade_encoder_decoder.py\", line 36, in __init__\r\n    pretrained=pretrained)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/segmentors/encoder_decoder.py\", line 34, in __init__\r\n    self._init_decode_head(decode_head)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/segmentors/cascade_encoder_decoder.py\", line 44, in _init_decode_head\r\n    self.decode_head.append(builder.build_head(decode_head[i]))\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/builder.py\", line 46, in build_head\r\n    return build(cfg, HEADS)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/builder.py\", line 31, in build\r\n    return build_from_cfg(cfg, registry, default_args)\r\n  File \"/root/userfolder/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/utils/registry.py\", line 171, in build_from_cfg\r\n    return obj_cls(**args)\r\n  File \"/root/userfolder/mmsegmentation/mmseg/models/decode_heads/fcn_head.py\", line 31, in __init__\r\n    super(FCNHead, self).__init__(**kwargs)\r\nTypeError: __init__() got an unexpected keyword argument 'drop_out_ratio'\r\n```\r\n\r\n**Bug fix**\r\nchange the keyword `drop_out_ratio=0.1` to `dropout_ratio=0.1` will fix this.\r\n\r\n\n", "before_files": [{"content": "# model settings\nnorm_cfg = dict(type='SyncBN', requires_grad=True)\nmodel = dict(\n    type='CascadeEncoderDecoder',\n    num_stages=2,\n    pretrained='open-mmlab://resnet50_v1c',\n    backbone=dict(\n        type='ResNetV1c',\n        depth=50,\n        num_stages=4,\n        out_indices=(0, 1, 2, 3),\n        dilations=(1, 1, 2, 4),\n        strides=(1, 2, 1, 1),\n        norm_cfg=norm_cfg,\n        norm_eval=False,\n        style='pytorch',\n        contract_dilation=True),\n    decode_head=[\n        dict(\n            type='FCNHead',\n            in_channels=1024,\n            in_index=2,\n            channels=256,\n            num_convs=1,\n            concat_input=False,\n            drop_out_ratio=0.1,\n            num_classes=19,\n            norm_cfg=norm_cfg,\n            align_corners=False,\n            loss_decode=dict(\n                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=0.4)),\n        dict(\n            type='OCRHead',\n            in_channels=2048,\n            in_index=3,\n            channels=512,\n            ocr_channels=256,\n            drop_out_ratio=0.1,\n            num_classes=19,\n            norm_cfg=norm_cfg,\n            align_corners=False,\n            loss_decode=dict(\n                type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0))\n    ])\n# model training and testing settings\ntrain_cfg = dict()\ntest_cfg = dict(mode='whole')\n", "path": "configs/_base_/models/ocrnet_r50-d8.py"}]}