Model trainer: save map.png after training

[?]
Jul 6, 2021, 12:01 AM
2ABZP2KNBJEMIR46B5UM7JXNYLM7CTFA5YA7VFQIS5JYYH4W5PYAC

Dependencies

  • [2] 7ML3OFE7 Model trainer: initial train and visualize thread pair (total crust mass; todo: altitude instead)
  • [*] ZM2EMAZO Start doing python multi-module stuff properly
  • [*] SJHJS463 Model trainer: main function to open sdl window and launch second thread for actual training

Change contents

  • edit in trainmodel/src/__main__.py at line 3
    [5.28]
    [2.0]
    import tensorflow as tf
  • edit in trainmodel/src/__main__.py at line 14
    [5.129]
    [5.129]
    inputs = tf.reshape(drawmap.inputs_equirectangular(2048,1024), (2048 * 1024, 3))
    outputs = tf.reshape(monitor.target(inputs), (1024,2048, 1))
    outputs = tf.cast(outputs * 255, tf.uint8)
    outputs = tf.io.encode_png(outputs).numpy()
    f = open("map.png", 'wb')
    f.write(outputs)
    f.close()