提交 6ef38ad7 authored 作者: Olivier Breuleux's avatar Olivier Breuleux

losgrhghrelgheruiogh45uiwgheruighuigher

上级 3643e997
...@@ -268,10 +268,13 @@ class PythonOp(Op): ...@@ -268,10 +268,13 @@ class PythonOp(Op):
raise NotImplementedError("This op has no implementation.") raise NotImplementedError("This op has no implementation.")
def _specs(self): def _specs(self):
return self.specs(*[input.spec for input in self.inputs]) try:
return self.specs(*[input.spec for input in self.inputs])
except NotImplementedError:
raise NotImplementedError("%s cannot infer the specs of its outputs" % self.__class__.__name__)
def specs(*inputs): def specs(*inputs):
raise NotImplementedError("This op cannot infer the specs of its outputs.") raise NotImplementedError
def refresh(self, except_list = []): def refresh(self, except_list = []):
for input in self.inputs: for input in self.inputs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论