摘要: #按照顺序采样 一共有6种方式进行索引: Basic indexing: [idx][idx][idx] 只能取一个元素 a = tf.ones([1,5,5,3]) a[0][0] a[0][0][0] a[0][0][0][2] Same with Numpy: [idx, idx,...] a 阅读全文
posted @ 2021-06-02 20:20 stdforml 阅读(269) 评论(0) 推荐(0) 编辑
摘要: #创建Tensor ##从numpy上转换得到,或者通过list 通过`tf.convert_to_tensor()'将一个numpy的array或者list转化为tensor tf.convert_to_tensor(np.ones([2,3])) #将int型转化为float64,需要再次将fl 阅读全文
posted @ 2021-06-02 10:33 stdforml 阅读(446) 评论(0) 推荐(0) 编辑