0

It seems like you can only log data by return values from train. In many workflows, it might make more sense to directly save images in the middle of a train function (e.g. save images sampled by a generative model or from a vision-based MDP).

Is there a simple way to do this? One idea would be to try to find the log-directory and write to it directly, but would this have issues?

Veech
  • 1,397
  • 2
  • 12
  • 20

1 Answers1

2

I'm guessing you're asking about using logging images in Trainable:_train().

If you're not in local mode, within the trainable, you can access the self.logdir attribute to write images to. This should automatically be sync'ed back to your head node (if you're running remotely).

richliaw
  • 1,925
  • 16
  • 14
  • Thanks! Is this documented anywhere? Now that I look into it, I see that it's set in `Trainable.__init__`, but it's not clear if that's part of the public interface. – Veech May 24 '19 at 18:11
  • 1
    Oh, good point - I've made a PR and will get this merged soon; thanks! – richliaw May 25 '19 at 19:18