Added actual tensor displaying. Added more tests. Added select channels.

This commit is contained in:
simleek
2019-10-11 22:58:42 -07:00
parent 60a29ddd9c
commit a3ba16d56c
15 changed files with 413 additions and 70 deletions

View File

@ -0,0 +1,9 @@
from displayarray.effects import crop
from displayarray import display
import numpy as np
# Scroll the mouse wheel and press ctrl, alt, or shift to select which channels are displayed as red, green, or blue.
arr = np.ones((250, 250, 250))
for x in range(250):
arr[..., x] = x / 250.0
display(arr).block()

View File

@ -1,9 +1,9 @@
from displayarray import display
import numpy as np
arr = np.random.normal(0.5, 0.1, (100, 100, 3))
arr = np.random.normal(0.5, 0.1, (100, 100, 5))
with display(arr) as displayer:
while displayer:
arr[:] += np.random.normal(0.001, 0.0005, (100, 100, 3))
arr[:] += np.random.normal(0.001, 0.0005, (100, 100, 5))
arr %= 1.0

View File

@ -39,3 +39,9 @@ while displayer:
autoencoder.fit(grab_noise, grab, steps_per_epoch=1, epochs=1)
output_image = autoencoder.predict(grab, steps=1)
displayer.update((output_image[0] * 255.0).astype(np.uint8), "uid for autoencoder output")
get_3rd_layer_output = tf.keras.backend.function([autoencoder.layers[0].input],
[autoencoder.layers[1].output])
layer_output = get_3rd_layer_output([grab_noise])[0]
displayer.update(layer_output[0], "conv 1")