Exemplo n.º 1
0
 def resolve_model_op(self, opspec):
     path = os.path.join(config.cwd(), opspec)
     if not python_util.is_python_script(path):
         return None
     script = python_util.Script(path)
     if not self.is_keras_script(script):
         return None
     model = KerasScriptModelProxy(opspec, script.src)
     return model, model.op_name
Exemplo n.º 2
0
 def resolve_model_op(self, opspec):
     path = os.path.join(config.cwd(), opspec)
     if not python_util.is_python_script(path):
         self.log.debug("%s is not a python script", path)
         return None
     script = python_util.Script(path)
     if not self.is_keras_script(script):
         self.log.debug("%s is not a Keras script", path)
         return None
     model = KerasScriptModelProxy(script.src, opspec)
     self.log.debug("%s is a Keras script", path)
     return model, model.op_name
Exemplo n.º 3
0
 def resolve_model_op(self, opspec):
     path = os.path.join(config.cwd(), opspec)
     if not python_util.is_python_script(path):
         return None
     model = PythonScriptModelProxy(path, opspec)
     return model, model.op_name