New test: to test tuple -> list "automatic" conversion of Module members

上级 ae343210
......@@ -422,6 +422,18 @@ def test_pickle_aliased_memory():
assert m_dup.y[0,0] == 3.142
def test_tuple_members():
M = Module()
M.a = (1,1)
assert isinstance(M.a, tuple)
class Temp(Module):
def __init__(self):
self.a = (1,1)
M = Temp()
assert isinstance(M.a, tuple)
if __name__ == '__main__':
from theano.tests import main
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论