beginScope
fast-tensor / beginScope
Function: beginScope()
beginScope():
void
Start a scope to track any instances created. Should be used with ft.endScope()
.
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