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

Add code in comment that need to be more tested.

上级 14b8c61d
...@@ -858,6 +858,20 @@ class ScanSaveMem(gof.Optimizer): ...@@ -858,6 +858,20 @@ class ScanSaveMem(gof.Optimizer):
if store_steps[i] != -1: if store_steps[i] != -1:
pval = select_max(pval, store_steps[i]) pval = select_max(pval, store_steps[i])
# TODO: Simplify the number of steps needed.
# FB: This need good testing, left to later.
# call get_scalar_constant_value()? it can
# return python/numpy scalar or numpy.ndarray currently.
#pval = pre_greedy_local_optimizer(list_opt_slice,
# pval)
#pval = pre_constant_merge([pval])[0]
#if (isinstance(pval, theano.tensor.TensorConstant) and
# pval.dtype.startswith('int')):
# try:
# pval = int(pval.data)
# except Exception:
# pass
store_steps[i] = pval store_steps[i] = pval
flag_store = True flag_store = True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论