prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CPCv2-Resnet18 pretrained not available
  Hi, 
  When I try to load a pretrained CPCv2-resnet18 model, I get an `urllib.error.HTTPError: HTTP Error 403: Forbidden` error. The code I use to load the pretrained model is 
  ```
  model = CPCV2(encoder='resnet18', pretrained=True)
  x = torch.rand(1, 3, 224, 224)
  feats = model.encoder(x)
  ```
  The following URL doesn't seem to open on my browser (Chrome) too. 
  https://github.com/PyTorchLightning/pytorch-lightning-bolts/blob/32fb560a429532dfb40a5935ca7674990dae1f66/pl_bolts/utils/pretrained_weights.py#L6
  
  Any help is much appreciated.
  Thanks! 
  
  
  </issue>
  <code>
  [start of pl_bolts/utils/pretrained_weights.py]
  1 
  2 
  3 vae_imagenet2012 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \
  4                    'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'
  5 
  6 cpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \
  7                  'cpc/resnet18_version_6/checkpoints/epoch%3D85.ckpt'
  8 urls = {
  9     'vae-imagenet2012': vae_imagenet2012,
  10     'CPCV2-resnet18': cpcv2_resnet18
  11 }
  12 
  13 
  14 def load_pretrained(model, class_name=None):  # pragma: no-cover
  15     if class_name is None:
  16         class_name = model.__class__.__name__
  17     ckpt_url = urls[class_name]
  18     weights_model = model.__class__.load_from_checkpoint(ckpt_url)
  19     model.load_state_dict(weights_model.state_dict())
  20
  [end of pl_bolts/utils/pretrained_weights.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/pl_bolts/utils/pretrained_weights.py b/pl_bolts/utils/pretrained_weights.py
  --- a/pl_bolts/utils/pretrained_weights.py
  +++ b/pl_bolts/utils/pretrained_weights.py
  @@ -4,7 +4,7 @@
                      'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'
   
   cpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \
  -                 'cpc/resnet18_version_6/checkpoints/epoch%3D85.ckpt'
  +                 'cpc/resnet18-v6/epoch%3D85.ckpt'
   urls = {
       'vae-imagenet2012': vae_imagenet2012,
       'CPCV2-resnet18': cpcv2_resnet18
  
verification_info: {"golden_diff": "diff --git a/pl_bolts/utils/pretrained_weights.py b/pl_bolts/utils/pretrained_weights.py\n--- a/pl_bolts/utils/pretrained_weights.py\n+++ b/pl_bolts/utils/pretrained_weights.py\n@@ -4,7 +4,7 @@\n                    'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'\n \n cpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n-                 'cpc/resnet18_version_6/checkpoints/epoch%3D85.ckpt'\n+                 'cpc/resnet18-v6/epoch%3D85.ckpt'\n urls = {\n     'vae-imagenet2012': vae_imagenet2012,\n     'CPCV2-resnet18': cpcv2_resnet18\n", "issue": "CPCv2-Resnet18 pretrained not available\nHi, \r\nWhen I try to load a pretrained CPCv2-resnet18 model, I get an `urllib.error.HTTPError: HTTP Error 403: Forbidden` error. The code I use to load the pretrained model is \r\n```\r\nmodel = CPCV2(encoder='resnet18', pretrained=True)\r\nx = torch.rand(1, 3, 224, 224)\r\nfeats = model.encoder(x)\r\n```\r\nThe following URL doesn't seem to open on my browser (Chrome) too. \r\nhttps://github.com/PyTorchLightning/pytorch-lightning-bolts/blob/32fb560a429532dfb40a5935ca7674990dae1f66/pl_bolts/utils/pretrained_weights.py#L6\r\n\r\nAny help is much appreciated.\r\nThanks! \r\n\n", "before_files": [{"content": "\n\nvae_imagenet2012 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n                   'vae/imagenet_06_22_2019/checkpoints/epoch%3D63.ckpt'\n\ncpcv2_resnet18 = 'https://pl-bolts-weights.s3.us-east-2.amazonaws.com/' \\\n                 'cpc/resnet18_version_6/checkpoints/epoch%3D85.ckpt'\nurls = {\n    'vae-imagenet2012': vae_imagenet2012,\n    'CPCV2-resnet18': cpcv2_resnet18\n}\n\n\ndef load_pretrained(model, class_name=None):  # pragma: no-cover\n    if class_name is None:\n        class_name = model.__class__.__name__\n    ckpt_url = urls[class_name]\n    weights_model = model.__class__.load_from_checkpoint(ckpt_url)\n    model.load_state_dict(weights_model.state_dict())\n", "path": "pl_bolts/utils/pretrained_weights.py"}]}