Tensorflow 类型
▲Tensorflow:查看global variable和local variable
https://blog.csdn.net/cerisier/article/details/86523446
▲tf.argmax()函数中有个axis参数(轴),该参数能指定按照哪个维度计算。
如 在矩阵的结构中,axis可被设置为0或1,分别表示
0:按行计算,1:列计算
▲tf.squeeze()删掉维度为1的
squeeze( input, axis=None, name=None, squeeze_dims=None)
该函数返回一个张量,这个张量是将原始input中所有维度为1的那些维都删掉的结果
axis可以用来指定要删掉的为1的维度,此处要注意指定的维度必须确保其是1,否则会报错
▲ tf.metrics.accuracy()
tf.metrics.accuracy返回两个值,accuracy为到上一个batch为止的准确度,update_op为更新本批次后的准确度。
accuracy, update_op = tf.metrics.accuracy(labels=x, predictions=y)
https://blog.csdn.net/lyb3b3b/article/details/83047148
Numpy和matplotlib
▲scatter画图
![](https://img.haomeiwen.com/i18860057/580206923d924ee1.png)
▲np.ones()创建数组
![](https://img.haomeiwen.com/i18860057/48341ba2fe039f04.png)
▲python for语句遍历:到底该怎么做?
网友评论