主页 返回 进入列表
总根
>计算机与教育
>课程
>高等教育课程
>本科课程
>模式识别与人工智能
>ZSTU-(2020-2021)-1
>学生作业
>2018329621111隋馨
作业九:tensorflow.js数据拟合曲线的模型建立和训练过程
第一步 :设置变量
首先,我们需要创建一些变量。即开始我们是不知道a、b、c、d的值的,所以先给他们一个随机数,入戏所示:
const a = tf.variable(tf.scalar(Math.random()));
const b = tf.variable(tf.scalar(Math.random()));
const c = tf.variable(tf.scalar(Math.random()));
const d = tf.variable(tf.scalar(Math.random()));
第二步:创建模型
我们可以通过TensorFlow.js中的链式调用操作来实现这个多项式方程全文(Full Article): https://yvsou.com/dc/single.php?groupid=28.218.81608.81609.81613.85931.85932.83187.85970&pid=1338502&startgroup=
首先,我们需要创建一些变量。即开始我们是不知道a、b、c、d的值的,所以先给他们一个随机数,入戏所示:
const a = tf.variable(tf.scalar(Math.random()));
const b = tf.variable(tf.scalar(Math.random()));
const c = tf.variable(tf.scalar(Math.random()));
const d = tf.variable(tf.scalar(Math.random()));
第二步:创建模型
我们可以通过TensorFlow.js中的链式调用操作来实现这个多项式方程全文(Full Article): https://yvsou.com/dc/single.php?groupid=28.218.81608.81609.81613.85931.85932.83187.85970&pid=1338502&startgroup=