提交 1105cf02 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

dont check value for None eval point

上级 a14c3837
...@@ -4580,25 +4580,28 @@ class Dot(Op): ...@@ -4580,25 +4580,28 @@ class Dot(Op):
'second input passed to Dot.R_op has no test value') 'second input passed to Dot.R_op has no test value')
debugger_available = False debugger_available = False
try: if eval_points[0]:
ev0 = gof.op.get_test_value(eval_points[0]) try:
except AttributeError: ev0 = gof.op.get_test_value(eval_points[0])
gof.op.missing_test_message( except AttributeError:
'first eval point passed to Dot.R_op has no test value') gof.op.missing_test_message(
debugger_available = False 'first eval point passed to Dot.R_op has no test value')
try: debugger_available = False
ev1 = gof.op.get_test_value(eval_points[1]) if eval_points[1]:
except AttributeError: try:
gof.op.missing_test_message( ev1 = gof.op.get_test_value(eval_points[1])
'second eval point passed to Dot.R_op has no test value') except AttributeError:
debugger_available = False gof.op.missing_test_message(
'second eval point passed to Dot.R_op has no test value')
debugger_available = False
if debugger_available: if debugger_available:
input_values = [iv0, iv1] input_values = [iv0, iv1]
eval_point_values = [ev0, ev1] eval_point_values = [ev0, ev1]
for i in xrange(2): for i in xrange(2):
if input_values[i].shape != eval_point_values[i].shape: if eval_pooint_values[i] and \
input_values[i].shape != eval_point_values[i].shape:
raise ValueError('input ' + str(i) + ' and eval_point ' + raise ValueError('input ' + str(i) + ' and eval_point ' +
str(i) + ' to Dot.R_op ' str(i) + ' to Dot.R_op '
'should have the ' 'should have the '
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论