I have a python class which contains tensorflow related 
stuff(session,model,logics ..),and I want to save an instance of this class 
as a field of another grpc-based class,and this grpc-based class 
implemented some grpc related logic,will listen on a port,and pass received 
request to saved tensorflow related instance to proces,whole logic like 
this:

TFRelated.py.......

class TFRelated:
   ....
   def init(self):
      #load model and another logic

   def process(self,req):
      ....
      tf.get_default_graph().get_tensor_by_name(..)
      ....
if __name__=='__main__':
    tfRelated=TFRelated()
    request=....
    #works fine
    tfRelated.process(request)

RPCBased.py.........

class RPCBased:
   def __init__(self):
       self.net=TFRelated()

   def rpcInterface(self,req):
      #the line below will give :keyError: "The name 'input:0' 
      #refers to a Tensor which does not exist..." 
       return self.net.process(req)

same model,same key,so not a key issue ,and the error only comes out under 
rpc context,so it may be rpc thread related issue,would you please help 
solve this problem?

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/cb222698-84a8-4622-9986-fde4594ca3fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to