We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tensorflow DisplayFractal(ns.eval()) fails in docker image.
>>> DisplayFractal(ns.eval()) <IPython.core.display.Image object>
What can I say. Release early, fix often.
The text was updated successfully, but these errors were encountered:
print(DisplayFractal(ns.eval()) should work. If not, create it in a directory or try different file form
print(DisplayFractal(ns.eval())
Sorry, something went wrong.
import tensorflow as tf import numpy as np from PIL import Image def DisplayFractal(a): a_cyclic = (6.28*a/20.0).reshape(list(a.shape)+[1]) img = np.concatenate([10+20*np.cos(a_cyclic), 30+50*np.sin(a_cyclic), 155-80*np.cos(a_cyclic)], 2) img[a==a.max()] = 0 a = img im = Image.fromarray(np.uint8(np.clip(a, 0, 255))) im.show() sess = tf.InteractiveSession() Y, X = np.mgrid[-1.3:1.3:0.005, -2:1:0.005] Z = X+1j*Y xs = tf.constant(Z.astype(np.complex64)) zs = tf.Variable(xs) ns = tf.Variable(tf.zeros_like(xs, tf.float32)) tf.global_variables_initializer().run() zs_ = zs*zs + xs not_diverged = tf.abs(zs_) < 4 step = tf.group( zs.assign(zs_), ns.assign_add(tf.cast(not_diverged, tf.float32)) ) for i in range(200): step.run() DisplayFractal(ns.eval())
Thanks YannickS94, works fine :)
No branches or pull requests
tensorflow DisplayFractal(ns.eval()) fails in docker image.
What can I say. Release early, fix often.
The text was updated successfully, but these errors were encountered: