faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

Train stop after save

Open jackylee1 opened this issue 8 years ago • 13 comments

root@86a322874a53:/srv/faceswap-master-2# python3 faceswap.py train -A data/trump -B data/cage -m models/

Model A Directory: /srv/faceswap-master-2/data/trump Model B Directory: /srv/faceswap-master-2/data/cage Training data directory: /srv/faceswap-master-2/models Loading data, this may take a while... Loading Model from Model_Original plugin... Exit requested! The trainer will complete its current cycle, save the models and quit (it can take up a couple of seconds depending on your training speed). If you want to kill it now, press Ctrl + c Using TensorFlow backend. Failed loading existing training data. Unable to open file (unable to open file: name = '/srv/faceswap-master-2/models/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0) Loading Trainer from Model_Original plugin... Starting. Press "Enter" to stop training and save model 2018-02-06 04:10:00.910910: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA saved model weights loss_A: 0.18594, loss_B: 0.20080 saved model weights

it saves model weights so fast and the result of course is bad

jackylee1 avatar Feb 06 '18 04:02 jackylee1

It says in the stack trace: no such file or directory.

Create the models directory and it will be good I think

gdunstone avatar Feb 06 '18 04:02 gdunstone

not the problem,thanks anyway

jackylee1 avatar Feb 06 '18 04:02 jackylee1

i have try it a week ago,it works good ,but recently it always stop early with no error

jackylee1 avatar Feb 06 '18 04:02 jackylee1

Can you please reword the problem?

Saving model weights fast is a good thing, saving them at a high frequency will have a performance impact but shouldn't impact the result.

There is a key press (s) that will save the model weights that might have something to do with it.

Can you describe how it stops? Does it freeze the system? Does it hang? Does it give a return code?

Also what version of python3, Cuda, and tensorflow are you using?

gdunstone avatar Feb 06 '18 05:02 gdunstone

thank you! i mean saving model weights fast but the loss is still high ,i have no idea how it stops.just sometimes it works well.most time it saved model weights just once.i use docker pull it.no return code as i show above.python3

jackylee1 avatar Feb 06 '18 06:02 jackylee1

It takes a lot of time to converge, I dont know much about the docker image.

gdunstone avatar Feb 06 '18 11:02 gdunstone

Didn't you just press enter too much? pressing enter is the only way to stop it, otherwise it will just continue training indefinitely.

If it stops without pressing enter there's nothing left to do for you but start debugging to see why it exits the program.

BeatHarness avatar Feb 06 '18 15:02 BeatHarness

Also note that loss_A: 0.18594, loss_B: 0.20080 is not a good value, usable value is closer to 0.03 or less. Also look at the preview to estimate wether your training is ok or not

Clorr avatar Feb 06 '18 18:02 Clorr

@Clorr - it looks like his execution stopped directly after the first update/save.

BeatHarness avatar Feb 07 '18 12:02 BeatHarness

Do reopen if it not solved and that you can bring more info on this

Clorr avatar Feb 08 '18 14:02 Clorr

maybe i found the reason.i copy the command and pasted .and the command include lots of enter key/

jackylee1 avatar Feb 09 '18 02:02 jackylee1

Thank you for all of you guys.fozhu bless you all.

jackylee1 avatar Feb 09 '18 02:02 jackylee1

You're welcome

Clorr avatar Feb 11 '18 18:02 Clorr