opencv - Image processing in TensorFlow distributed session -
i testing out tensorflow distributed (https://www.tensorflow.org/deploy/distributed) local machine (windows) , ubuntu vm. where, have followed link distributed tensorflow replicated training example: grpc_tensorflow_server - no such file or directory , set tensorflow called server per below.
import tensorflow tf parameter_servers = ["10.0.3.15:2222"] workers = ["10.0.3.15:2222","10.0.3.15:2223"] cluster = tf.train.clusterspec({"local": parameter_servers, "worker": workers}) server = tf.train.server(cluster, job_name="local", task_index=0) server.join() where “10.0.3.15” – ubuntu local ip address. in windows host machine – doing simple image preprocessing using open cv , extending graph session vm. have used following code that.
*import tensorflow tf opencvtest import * tf.session("grpc:// 10.0.3.15:2222") sess: ### open cv calling section ### img = cv2.imread('data/ball.jpg') grey_img = cv2.cvtcolor(img, cv2.color_rgb2gray) flat_img_array = img.flatten() x = tf.placeholder(tf.float32, shape=(flat_img_array[0],flat_img_array[1])) y = tf.multiply(x, x) sess.run(y)* i can see session running on ubunu machine. please see below screenshot.
[ note- in image notice, in windows console calling session , ubuntu terminal listening same session. ]
but strange thing have observed opencv preprocessing operation (grey_img = cv2.cvtcolor(img, cv2.color_rgb2gray)) it’s leveraging local opencv package. in assumption when running session on other server should operation on server. in case running session on ubuntu vm, should run operation has been defined tf.session("grpc:// 10.0.3.15:2222") in should running on ubuntu vm leveraging vm’s local packages, that’s not happening. understanding of sess.run(y) distributed correct ? when run session in distributed manner. extend graph computation load machine through grpc ? summarize ask - “i planning large pre-preprocessing before feeding value tensor , want in distributed way. better approach follow ? initial understanding can tensorflow distributed test think may not able it.“ thoughts of real help. thank you.
Comments
Post a Comment