Coder Social home page Coder Social logo

Comments (4)

IDKiro avatar IDKiro commented on June 12, 2024

不知道我又没有理解对,你是想把CycleGAN的循环一致性约束加进去。在我做StarEnhancer的时候是不起作用的,但是后来我的一个未发表新工作(结构上有差别)又显示它可以提点。所以我也尚不清楚循环一致性约束的起效条件,但是我觉得你可以自行尝试一下,还是有希望提点的。
至于Triplet loss这种正负样本损失,在我的实验中是没有明显效果的。

from starenhancer.

jxust01 avatar jxust01 commented on June 12, 2024

是的,因为没有配对图,所以想尝试CycleGAN的思路,但是经过几次enhancer后,recover和source在rgb2lab后计算L1loss时会出问题。

/opt/conda/conda-bld/pytorch_1603728993639/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:115: operator(): block: [374,0,0], thread: [10,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1603728993639/work/aten/src/ATen/native/cuda/ScatterGatherKernel.cu:115: operator(): block: [374,0,0], thread: [14,0,0] Assertion `idx_dim >= 0 && idx_dim < index_size && "index out of bounds"` failed.
Traceback (most recent call last):
  File "train_enhancer_triplet.py", line 139, in <module>
    loss = train(train_loader, mapping, enhancer, criterion, optimizer)
  File "train_enhancer_triplet.py", line 64, in train
    loss_l1 = criterion(recoverA, source_img) + criterion(recoverB, target_img)
  File "/simple/zlp1/miniconda3/envs/py365/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/simple/zlp1/masters/StarEnhancer/model/loss.py", line 56, in forward
    out_lab = self.rgb2lab(out_image)
  File "/simple/zlp1/masters/StarEnhancer/model/loss.py", line 48, in rgb2lab
    img[(img != img).detach()] = 0
RuntimeError: CUDA error: device-side assert triggered

from starenhancer.

IDKiro avatar IDKiro commented on June 12, 2024

这好像是内存索引超边界了,远程排查比较困难,你尝试一下:

  1. lab上的L1 loss换成rgb上的L1 loss,也就是不经过rgb2lab这一步
  2. 预测曲线参数的网络最后添加tanh,确保output的值域在[-1, 1],否则recover的时候输入超出了曲线的输入值域
  3. FEModel看上去是一个类似perceptual loss那样的预训练模型,尝试去掉相关的内容

from starenhancer.

jxust01 avatar jxust01 commented on June 12, 2024

好的,1、3方法实验过是ok的,2中方法我去试试。谢谢您的解答!

from starenhancer.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.