tf.keras.layers.Concatenate(
axis=-1, **kwargs
)
作用是:它接受一个张量列表作为输入,除了连接轴外,所有的张量形状都相同,返回一个张量,它是所有输入的连接
import tensorflow as tf
x = np.arange(20).reshape(2, 2, 5)
print(x)
[[[ 0 1 2 3 4]
tf.keras.layers.Concatenate(
axis=-1, **kwargs
)
作用是:它接受一个张量列表作为输入,除了连接轴外,所有的张量形状都相同,返回一个张量,它是所有输入的连接
import tensorflow as tf
x = np.arange(20).reshape(2, 2, 5)
print(x)
[[[ 0 1 2 3 4]