![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
人工智能
屋顶那猫
这个作者很懒,什么都没留下…
展开
-
tensorflow入门:张量(下)
tf.random.normal()tf.random.normal()函数能创建随机数张量,其数值呈正态分布,括号内的属性为(shape, mean, stddev, dtype),shape为张量的形状,mean为平均值,stddev为标准差,dtype为数值类型。tf.random.truncated_normal()tf.random.truncated_normal()函数能创建...原创 2020-05-08 17:01:42 · 272 阅读 · 0 评论 -
tensorflow入门:张量(上)
tf.constant()tf.constant()函数可以简单快速地创建一个张量,格式为:tf.constant(value, dtype, shape)value : 张量的值,可以为数字/pyhton列表/Numpy数组dtype : 元素的类型shape : 形状,当shape为空时,表示张量为标量例:tf.cast(x, dtype)tf.cast()可以对张量的数据类型...原创 2020-05-06 17:54:13 · 277 阅读 · 0 评论