Tenzokarton + Keras + ML Engine

I currently have the Google Cloud ML Engine installed to train Keras-built models. When using Keras, it seems like ML Engine does not automatically save logs to the storage bucket. I can see the logs on the ML Engine Jobs page, but they do not appear in my storage and therefore I cannot run the tensogram during training.

You can see the job completed successfully and logs generated: enter image description here

But then there are no logs in my repository: enter image description here

I followed this guide while setting up my environment: ( http://liufuyang.github.io/2017/04/02/just-another-tensorflow-beginner-guide-4.html )

So how do I get the logs and run a tensogram when training a Keras model on ML Engine? Has anyone else had any success with this?

+3


source to share


1 answer


You will need to create a keras.callbacks.TensorBoard (..) callback to write the logs. See Tensorboad Callback . You can also give the GCS path (gs: // path / to / my / logs) to the log_dir argument of the callback, and then point Tensorboard to that location. You will add a callback to the list when you call model.fit_generator (...) or model.fit (...).



tb_logs = callbacks.TensorBoard(
            log_dir='gs://path/to/logs',
            histogram_freq=0,
            write_graph=True,
            embeddings_freq=0)

model.fit_generator(..., callbacks=[tb_logs])

      

+5


source







All Articles