(fn: () => any)
| 25 | } |
| 26 | |
| 27 | export async function expectAllTensorsReleased(fn: () => any) { |
| 28 | const numTensorsBefore = tf.memory().numTensors |
| 29 | await fn() |
| 30 | expect(tf.memory().numTensors - numTensorsBefore).toEqual(0) |
| 31 | } |
| 32 | |
| 33 | export function pointDistance(pt1: IPoint, pt2: IPoint) { |
| 34 | return Math.sqrt(Math.pow(pt1.x - pt2.x, 2) + Math.pow(pt1.y - pt2.y, 2)) |
no outgoing calls
no test coverage detected
searching dependent graphs…