faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

Outputting training graphs

Open BeatHarness opened this issue 8 years ago • 11 comments

Once I'm done with my current task I'd like to add a feature to output a graph of the training performance.

  • Add graph depicting epoch vs loss
  • add max-epoch parameter to be able to run for a specified amount of epochs

Please assign this to me. I'd like to hear more ideas on this subject.

BeatHarness avatar Feb 08 '18 15:02 BeatHarness

Both seem simple enough. The epochs are already limited in the script. It would only be necessary to change constant to a variable.

As for the graph, that would require a graphics output, possibly in separate window. Again, not exactly hard by itself. But since there is still no proper GUI we should be careful not to reinvent the wheel and make features that will be quickly obsolete.

Of course there are ways around that issue. For example text output to a csv file. That can be later used for creation of graph. Another option might be bare bones graphics in form of a bitmap.

But the real question is if the graph should be real time or made after the run of program.

GSonderling avatar Feb 08 '18 17:02 GSonderling

I was just thinking of writing the graph to a jpg at the same time the preview is shown/saved. Nice and easy.

BeatHarness avatar Feb 08 '18 19:02 BeatHarness

Well that wouldn't be too hard.

GSonderling avatar Feb 08 '18 19:02 GSonderling

I went with outputting SVG using Pygal as that has the least amount of dependencies and SVG is a universal format (can be opened with any webbrowser).

Ill create a pull for it soon.

BeatHarness avatar Feb 08 '18 23:02 BeatHarness

I am expressing interest in another preview window with a graph.

gdunstone avatar Feb 12 '18 03:02 gdunstone

@subzerofun If you want to use Tensorboard it'd might make more sense to use it directly on a merged model.

x1 = Input( shape=IMAGE_SHAPE )
x2 = Input( shape=IMAGE_SHAPE )
tbcallback = TensorBoard(log_path)
mergedModel = Model( [x1,x2] decoder_A( encoder(x1) ), decoder_B( encoder(x2) ) )
#...
mergedModel.fit(x=[warped_A,warped_B], y=[target_A,target_B], callbacks=[tbcallback])

dfaker avatar Feb 14 '18 22:02 dfaker

How about logging periodically so tensorboard can show all kinds of info beyond loss?

fat-tire avatar Apr 06 '18 02:04 fat-tire

I'm going to add a fairly basic loss graph to the GUI. Of course tensorboard will be able to do a lot more than I'll be able to do, but at least it will be something.

torzdf avatar Apr 06 '18 09:04 torzdf

#345

torzdf avatar Apr 14 '18 19:04 torzdf

Graphing added with PR #352 . Please open a new issue if looking to extend functionality.

torzdf avatar Apr 15 '18 16:04 torzdf