以下に示すような簡単なコードがあります。
class testxx(object):
def __init__(self, input):
self.input = input
self.output = T.sum(input)
a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype = np.float32)
classfier = testxx(a)
outxx = classfier.output
outxx = np.asarray(outxx, dtype = np.float32)
ただし、次のエラー情報が表示されます。
ValueError: setting an array element with a sequence.
さらに、theano.tensor の関数を使用すると、返されるのは "tensor" と呼ばれるようで、結果が行列のようになるはずなのに、単に numpy.array 型に切り替えることはできません。
それが私の質問です: outxx を numpy.array 型に切り替えるにはどうすればよいですか?