val generator: Model[TFloat32] = makeGeneratorModel()
val graph = new Graph
val tf = Ops.create(graph)
val noise = tf.random.randomStandardNormal(tf.constant(Array(1, 100)), classOf[TFloat32])
generator.compile(tf,
Optimizers.select(Optimizers.sgd),
Losses.select(Losses.sparseCategoricalCrossentropy),
Seq(Metrics.select(Metrics.accuracy)).asJava)
val generatedImage = ???
I don't understand how I can now get values out of the model. Do I need to call something like fetch and run on the graph, or is there a direct way in Keras?
Internally, I see I would probably need a session runner, but I see no API that calls it to generate output.
I believe it's just generator.apply() or generator.call(), with the difference in Keras Python that the latter takes additional arguments testing and mask.
In this tutorial, one step tests the untrained generator to produce a noise image:
I have this:
I don't understand how I can now get values out of the model. Do I need to call something like
fetch
andrun
on the graph, or is there a direct way in Keras?Internally, I see I would probably need a session runner, but I see no API that calls it to generate output.
Thanks