Getting the result into a variable
问题 I have the following example code. I'm able to see the correct result in the console from the print function. // Define a model for linear regression. const model = tf.sequential(); model.add(tf.layers.dense({units: 1, inputShape: [1]})); model.add(tf.layers.dense({units: 4, inputShape: [1]})); model.add(tf.layers.dense({units: 10, inputShape: [1]})); model.add(tf.layers.dense({units: 1, inputShape: [1]})); // Prepare the model for training: Specify the loss and the optimizer. model.compile(