Here’s the link to gist file, from which error is arrising from.
The function which is causing the error is backward_g()
In that there is scale loss term we are using which is the one causing error. I am not able to debug why this error is arising, even though everything is on the GPU.

  
      gist.github.com
  
  
    https://gist.github.com/pranavpandey2511/6832ba565bf4d3793141bf8d4920dd83 7
cycle_gan_model.py
import torch
import itertools
from util.image_pool import ImagePool
from .base_model import BaseModel
from . import networks
from PIL import Image
import torch.nn.functional as F
import numpy as np
import matplotlib.pyplot as plt
from models.vgg19 import VGG19
This file has been truncated. show original