项目文件夹

文件
Minjie Wang 8ea359d125 [API] Message propagation APIs (#127)
* add examples in traversal.py

* message propagate methods

* use the new message propagation for tree-lstm

* update to the new name

* update propagate API doc

* update doc

* add propagate utest
2018-11-09 15:04:57 -05:00

12 行
219 B
Python

import torch as th
def allclose(a, b):
return th.allclose(a, b, rtol=1e-4, atol=1e-4)
def check_fail(fn, *args, **kwargs):
try:
fn(*args, **kwargs)
return False
except:
return True