(self)
| 404 | t1.join() |
| 405 | |
| 406 | def testWeakrefEagerTensor(self): |
| 407 | x = constant_op.constant([[1.]]) |
| 408 | x.at1 = constant_op.constant([[2.]]) |
| 409 | x.at2 = 3. |
| 410 | weak_x = weakref.ref(x) |
| 411 | weak_xat1 = weakref.ref(x.at1) |
| 412 | del x |
| 413 | self.assertIs(weak_x(), None) |
| 414 | self.assertIs(weak_xat1(), None) |
| 415 | |
| 416 | def testWeakKeyDictionaryTensor(self): |
| 417 | weak_key_dict = weakref.WeakKeyDictionary() |