random_image = () => {
let out_img = tf.tidy(() => {
let rand_vector = tf.randomNormal([1,40])
let out_1 = apply_layer1(rand_vector)
let out_2 = apply_layer2(out_1)
let out_3 = apply_layer3(out_2)
let out_4 = apply_layer4(out_3)
let out_5 = apply_layer5(out_4)
let out_6 = apply_layer6(out_5)
return tf.squeeze(tf.scalar(.5).mul(out_6.add(tf.scalar(1))))
})
let the_img = out_img.arraySync()
tf.dispose(out_img)
return the_img
}