从二维数组中选一个矩形 import tensorflow as tf data = [[1,2,3,4,5,6,7,8],[11,12,13,14,15,16,17,18]] x = tf.strided_slice(data,[0,0],[2,4]) with tf.Session() as sess: print(sess.run(x)) numpy array转tensor import tensorflow as tf import numpy as np A = list([1, 2…