提交 de444dd9 authored 作者: John Salvatier's avatar John Salvatier

slightly better messages

上级 01c4db07
......@@ -3752,7 +3752,7 @@ class TestAdvancedSubtensor(unittest.TestCase):
def test_inc_adv_selection(self):
a = inc_subtensor(self.v[self.ix2], self.v[self.ix2])
assert a.type == self.v.type
assert a.type == self.v.type, (a.type,self.v.type)
f = theano.function([self.v, self.ix2], a, allow_input_downcast=True)
aval = f([.4, .9, .1], [[1, 2],
[1, 2]])
......@@ -3762,7 +3762,7 @@ class TestAdvancedSubtensor(unittest.TestCase):
subt = self.m[self.ix1,self.ix12]
a = inc_subtensor(subt, subt)
assert a.type == self.m.type, str(a.type) +str(a.type.broadcastable) + " " + str(self.m.type) + str(self.m.type.broadcastable)
assert a.type == self.m.type, (a.type, self.m.type)
f = theano.function([self.m, self.ix1, self.ix12], a, allow_input_downcast=True)
aval = f([[.4, .9, .1],
[5, 6, 7],
......@@ -3776,7 +3776,7 @@ class TestAdvancedSubtensor(unittest.TestCase):
def test_inc_adv_selection_with_broadcasting(self):
a = inc_subtensor(self.m[self.ix1,self.ix12], 2.1)
assert a.type == self.m.type
assert a.type == self.m.type, (a.type, self.m.type)
f = theano.function([self.m, self.ix1, self.ix12], a, allow_input_downcast=True)
aval = f([[.4, .9, .1],
[5, 6, 7],
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论