我想知道如何从theano中检索SharedVariable的维度。这在这里例如不起作用:fromtheanoimport*fromnumpyimport*importnumpyasnpw=shared(np.asarray(zeros((1000,1000)),np.float32))printnp.asarray(w).shapeprintnp.asmatrix(w).shape只返回()(1,1)我也对打印/检索矩阵或向量的值感兴趣.. 最佳答案 您可以像这样获取共享变量的值:w.get_value()那么这会起作用:w.ge