提交 f4c7ecfb authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix printed name and use the right variable

上级 36f94424
...@@ -438,9 +438,9 @@ class Stack(VM): ...@@ -438,9 +438,9 @@ class Stack(VM):
if hasattr(var.type, 'get_shape_info'): if hasattr(var.type, 'get_shape_info'):
sh = var.type.get_shape_info(data[0]) sh = var.type.get_shape_info(data[0])
else: else:
sh = 'input no shape' sh = 'no shape'
self.variable_shape[var] = sh self.variable_shape[var] = sh
st = getattr(data[0], 'strides', 'input no strides') st = getattr(data[0], 'strides', 'no strides')
if getattr(data[0], 'flags', False) and data[0].flags.c_contiguous: if getattr(data[0], 'flags', False) and data[0].flags.c_contiguous:
st = 'c' st = 'c'
elif (hasattr(data[0], 'is_c_contiguous') and elif (hasattr(data[0], 'is_c_contiguous') and
...@@ -499,15 +499,15 @@ class Stack(VM): ...@@ -499,15 +499,15 @@ class Stack(VM):
if hasattr(var.type, 'get_shape_info'): if hasattr(var.type, 'get_shape_info'):
sh = var.type.get_shape_info(o[0]) sh = var.type.get_shape_info(o[0])
else: else:
sh = 'input no shape' sh = 'no shape'
self.variable_shape[var] = sh self.variable_shape[var] = sh
st = getattr(o[0], 'strides', st = getattr(o[0], 'strides',
'input no strides') 'no strides')
if (getattr(o[0], 'flags', False) and if (getattr(o[0], 'flags', False) and
o[0].flags.c_contiguous): o[0].flags.c_contiguous):
st = 'c' st = 'c'
elif (hasattr(data[0], 'is_c_contiguous') and elif (hasattr(o[0], 'is_c_contiguous') and
data[0].is_c_contiguous()): o[0].is_c_contiguous()):
st = "c" st = "c"
self.variable_strides[var] = st self.variable_strides[var] = st
off = getattr(o[0], 'offset', '') off = getattr(o[0], 'offset', '')
...@@ -610,14 +610,14 @@ class Stack(VM): ...@@ -610,14 +610,14 @@ class Stack(VM):
if hasattr(var.type, 'get_shape_info'): if hasattr(var.type, 'get_shape_info'):
sh = var.type.get_shape_info(o[0]) sh = var.type.get_shape_info(o[0])
else: else:
sh = 'input no shape' sh = 'no shape'
self.variable_shape[var] = sh self.variable_shape[var] = sh
st = getattr(o[0], 'strides', 'input no strides') st = getattr(o[0], 'strides', 'no strides')
if (getattr(o[0], 'flags', False) and if (getattr(o[0], 'flags', False) and
o[0].flags.c_contiguous): o[0].flags.c_contiguous):
st = 'c' st = 'c'
elif (hasattr(data[0], 'is_c_contiguous') and elif (hasattr(o[0], 'is_c_contiguous') and
data[0].is_c_contiguous()): o[0].is_c_contiguous()):
st = "c" st = "c"
self.variable_strides[var] = st self.variable_strides[var] = st
off = getattr(o[0], 'offset', '') off = getattr(o[0], 'offset', '')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论