model_dict = {
reset_parameters;
const w = tf.tidy(
() => tf.variable(tf.randomNormal([D,1], 0, 1.0), true)
);
const b = tf.tidy(
() => tf.variable(tf.randomNormal([1], 0, 1.0), true)
);
const f = x =>
x.matMul(w)
.add(b)
.sigmoid()
.as1D();
yield {'model': f, 'w': w, 'b':b};
try {
yield invalidation;
} finally {
w.dispose();
b.dispose();
}
}