Giter Club home page Giter Club logo

Comments (9)

zhiying8710 avatar zhiying8710 commented on August 15, 2024

do u have found something about this?

from cartoongan-tensorflow.

giuliacassara avatar giuliacassara commented on August 15, 2024

Yes. I commented this block of code in file train.py, starting from line 624 and the training proceeds without OOM error.
Of course I don't realize the consequences on the elimination of the validation fake batch on the entire training.

with summary_writer.as_default(): if not self.disable_sampling: val_fake_batch = tf.cast( (generator(val_real_batch, training=False) + 1) * 127.5, tf.uint8) img = np.expand_dims(self._save_generated_images( val_fake_batch, image_name=("gan_val_generated_images_at_epoch_" f"{epoch_idx}_step_{step}.png")), 0, ) tf.summary.image('gan_val_generated_images', img, step=epoch)

from cartoongan-tensorflow.

zhiying8710 avatar zhiying8710 commented on August 15, 2024

ok, thx for ur anwser, i think may the summary_writer.as_default() is the cause, i'll try this solution.

from cartoongan-tensorflow.

giuliacassara avatar giuliacassara commented on August 15, 2024

Why do you think summary_writer.as_default() is the cause?

from cartoongan-tensorflow.

CodTan avatar CodTan commented on August 15, 2024

@giuliacern, removing the LOCs you mentioned didn't help me. Instead I reduced the number of batch_size, and it did the trick!

from cartoongan-tensorflow.

giuliacassara avatar giuliacassara commented on August 15, 2024

Where were you running the experiments?

from cartoongan-tensorflow.

CodTan avatar CodTan commented on August 15, 2024

Windows 7
Spyder 3.3.6
Python 3.7.4

from cartoongan-tensorflow.

fantasy-fish avatar fantasy-fish commented on August 15, 2024

@giuliacern, removing the LOCs you mentioned didn't help me. Instead I reduced the number of batch_size, and it did the trick!

But would reducing batch_size downgrade the model performance?

from cartoongan-tensorflow.

mnicnc404 avatar mnicnc404 commented on August 15, 2024

We suggest using gpu with more than 11GB memory. If you encounter OOM issues, try reducing batch_size, input_size, or d_base_filters and base_filters in train.py.

We don't have unlimited computing power so apparently we cannot try all possible hyper-parameter combinations; therefore we cannot guarantee the model performance if you change any of the default hyper-parameters. It's very likely that you get worse model performance when you are forced to change any of the hyper-parameters due to lack of memory, and we are sorry that we cannot do much with this issue.

from cartoongan-tensorflow.

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.