您好我是theano的新手,我需要[N x M * 4]点[M x P],所以我想要第二个矩阵重复4次。如何复制theano中的矩阵
喜欢的东西
import numpy as np
import theano
import theano.tensor as T
x = T.fmatrix("x")
z = x.repeat(3, axis=0)
foo = theano.function([x], z)
a = np.array([[1, 2], [3, 4]]).astype("float32")
c = foo(a)
print c
[[ 1. 2.]
[ 1. 2.]
[ 1. 2.]
[ 3. 4.]
[ 3. 4.]
[ 3. 4.]]
但在我的情况下,我想
[[ 1. 2.]
[ 3. 4.]
[ 1. 2.]
[ 3. 4.]
[ 1. 2.]
[ 3. 4.]]
我怎么能这样做呢?
感谢的人的工作!你是天才! –