endScope
fast-tensor / endScope
Function: endScope()
endScope():
void
End a scope of tracked instances. Should be used with ft.beginScope()
.
See ft.scope() for a simpler approach.
Returns
void
Example
ft.beginScope();
const a = tf.ones([2,2]);
const b = a.add(2);
const result = b.data();
ft.endScope();
// a and b will have been freed from memory