(a, b)
| 132 | n_grad2 = F.grad(g.ndata["u"]) |
| 133 | |
| 134 | def _print_error(a, b): |
| 135 | print("ERROR: Test copy_src_{} partial: {}".format(red, partial)) |
| 136 | for i, (x, y) in enumerate( |
| 137 | zip(F.asnumpy(a).flatten(), F.asnumpy(b).flatten()) |
| 138 | ): |
| 139 | if not np.allclose(x, y): |
| 140 | print("@{} {} v.s. {}".format(i, x, y)) |
| 141 | |
| 142 | if not F.allclose(r1, r2): |
| 143 | _print_error(r1, r2) |