import numpy as np
import cv2
import keras.backend as K
import tensorflow as tf
import cv2
import keras.backend as K
import tensorflow as tf
a = K.variable(np.array([[1 , 2, 3]]))
b = K.variable(np.array([[3 , 2, 1]]))
c1 = K.concatenate([a , b] , axis=0)
c2 = K.concatenate([a , b] , axis=-1)
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
print(sess.run(c1))
print(sess.run(c2))
with tf.Session() as sess:
sess.run(init)
print(sess.run(c1))
print(sess.run(c2))
# [[1. 2. 3.]
# [3. 2. 1.]]
# [[1. 2. 3. 3. 2. 1.]]
---------------------
作者:韋頁
来源:CSDN
原文:https://blog.csdn.net/hanshuobest/article/details/79488209
版权声明:本文为博主原创文章,转载请附上博文链接!
# [3. 2. 1.]]
# [[1. 2. 3. 3. 2. 1.]]
---------------------
作者:韋頁
来源:CSDN
原文:https://blog.csdn.net/hanshuobest/article/details/79488209
版权声明:本文为博主原创文章,转载请附上博文链接!