我有以下代碼:with tf.Session() as sess: sess.run(init_vars) cols = sess.run(tf.shape(descriptors)[1]) descriptor_matrix = np.zeros((n_batches*batch_size, cols)) while True: batch_descriptor = sess.run(descriptors, feed_dict={dropout_prob: 1}) descriptor_matrix[i:i+elements_in_batch] = np.array(batch_descriptor)我正在混合張量和 numpy 向量。這對性能有重要影響嗎?為什么?我應該只使用張量嗎?
添加回答
舉報
0/150
提交
取消