摘要: numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) 在指定的间隔内返回均匀间隔的数字。 返回num均匀分布的样本,在[start, stop]。 这个区间的端点可以任意的被排除在外。 当endpo 阅读全文
posted @ 2019-07-05 16:29 peterwong666 阅读(19442) 评论(0) 推荐(0) 编辑
摘要: 如下所示: 1 >>> import numpy as np 2 >>> x = np.array([1, 2]) 3 >>> y = np.array([[1],[2]]) 4 >>> z = np.array([[1,2]]) 5 >>> print(x.shape) 6 (2,) 7 >>> 阅读全文
posted @ 2019-07-05 16:27 peterwong666 阅读(1889) 评论(0) 推荐(0) 编辑
摘要: tf.assign(A, new_number): 这个函数的功能主要是把A的值变为new_number 例如: 输出: 0.010.0 开始给A赋值为0,经过tf.assign函数后,把A的值变为10 再例如: 输出: [14.] 阅读全文
posted @ 2019-07-05 11:15 peterwong666 阅读(3093) 评论(0) 推荐(0) 编辑