#coding:utf-8 #损失函数 loss=(w+1)^2 ,令w初值是常数5 反向传播就是求最优的w,即最小loss对应的w值 #0导入模块,生成模拟数据集。 import tensorflow as tf import numpy as np w = tf……