提交 94af282e authored 作者: Frederic Bastien's avatar Frederic Bastien

Small crash fix. We need the context, not the context name.

上级 c700c696
...@@ -220,7 +220,8 @@ class DnnBase(COp): ...@@ -220,7 +220,8 @@ class DnnBase(COp):
return node.outputs[0].type.context_name return node.outputs[0].type.context_name
def get_params(self, node): def get_params(self, node):
ctx = self.dnn_context(node) ctx_name = self.dnn_context(node)
ctx = get_context(ctx_name)
if not hasattr(ctx, 'cudnn_handle_param'): if not hasattr(ctx, 'cudnn_handle_param'):
ptr = ctx.cudnn_handle.value ptr = ctx.cudnn_handle.value
res = handle_type.make_value(ptr) res = handle_type.make_value(ptr)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论