Code Monkey home page Code Monkey logo

Comments (7)

rbracco avatar rbracco commented on July 4, 2024 14

The above change adds a new argument eps to run.py such that if the L2 loss goes below eps, the program returns. If at the end of steps steps, the L2 loss is not less than eps the run fails with that error. Thus another fix is to choose a value for eps that is less than your L2 loss at the end.

image

After 100 steps I had an L2 loss of 0.006 (6e-3) so I set my eps to 8e-3 with the following colab code, and it worked. The step after this is to lower epsilon and increase steps to get a better result. The best option would be reverting though as we generally just want to see the best result achieved.

seed = 100 #@param {type:"integer"}
epsilon = 8e-3
noise_type = 'trainable'  #@param ['zero', 'fixed', 'trainable']
optimizer = 'adam'  #@param ['sgd', 'adam','sgdm', 'adamax']
learning_rate = 0.4 #@param {type:"slider", min:0, max:1, step:0.05}
learning_rate_schedule = 'linear1cycledrop'  #@param ['fixed', 'linear1cycle', 'linear1cycledrop']
steps = 750 #@param {type:"slider", min:100, max:1000, step:50}
clear_output()

seed = abs(seed)
print('Estimated Runtime: {}s.\n'.format(round(0.23*steps)+6))
!python run.py \
  -seed $seed \
  -noise_type $noise_type \
  -opt_name $optimizer \
  -learning_rate $learning_rate \
  -steps $steps \
  -lr_schedule $learning_rate_schedule \
  -eps $epsilon

from pulse.

jkyndir avatar jkyndir commented on July 4, 2024 6

Increasing the number of steps would solve the issue.

from pulse.

udf avatar udf commented on July 4, 2024

Not sure if this is the recommended way to fix this, but I had the same problem with a 32x32 image. I upscaled it to 1024x1024 (bicubic, so the result is blurry), and it seemed to work for me.

from pulse.

MoArtis avatar MoArtis commented on July 4, 2024

I got the same error with all the images I tried. But only one of them worked using @udf 's method. Thanks anyway! :)

from pulse.

lspgn avatar lspgn commented on July 4, 2024

It seems to have been introduced by this commit ece9211
I ran a test on Face-Depixelizer with it reverted, it worked.

from pulse.

0xinit avatar 0xinit commented on July 4, 2024

Hi @udf , how did you upscaled your images? I have my input in 128x128, and I was looking to upscale it to 1024x1024. Can you explain a bit?

from pulse.

nanmehta avatar nanmehta commented on July 4, 2024

hi...can anyone please help me know how the downsampling loss is implemented. Is it l1 or l2 loss being used to compare the generated low-resolution and the LR image.
please any1 let me know

from pulse.

Related Issues (20)

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.