K.tile(input_tensor , tile_tensor)
对tensor进行复制
同tf.tile()
K.tile(inputs,[1,1,1,512]) #inputs是四维张量,[batchsize,width,height, channels]
#把channel第四维复制512倍 经常搭配Kexpand_dims(x, axis=-1)
numpy 转换成tensor
tf.convert_to_tensor(img_numpy)
Tensor转换成numpy array输出
img_numpy=img.eval(session=sess)
K.print_tensor
https://stackoverflow.com/questions/43448029/debugging-keras-tensor-values
K.expand_dims(one_img, -1) 增加维度,一般在tile复制某一维度之前,都要先进行维度扩展