These are chat archives for ipython/ipython

Sep 2018
Min RK
Sep 30 2018 18:31
As a kernel? Exit the process cleanly.
Sep 30 2018 20:41
def function1(input):        
  sess = tensorflow.Session()
  saver = tensorflow.train.import_meta_graph(FILELOCATION)
  saver.restore(self.sess, tensorflow.train.latest_checkpoint(LOCATION))
  graph = tensorflow.get_default_graph()
  y_pred = graph.get_tensor_by_name("y_pred:0")
  x= graph.get_tensor_by_name("x:0")
  y_true = graph.get_tensor_by_name("y_true:0")
  y_test_images = numpy.zeros((1, len(os.listdir(DIRECTORY))))
  x_batch = {some calculations using input}  # Except this all other values doesn't depend on input
  result = (y_pred, x, x_batch, y_true, y_test_images) 
  return result
except x_batch parameter all other parameters doesn't depend on the input. So wanted to break down the code so the the values which doesnt depend on input are calculated once and put into an object and then send to the function which uses them through async
@minrk Can you suggest some workaround or a way how we can do this.. Thanks