nP = model.get_dim("nP")
nI = model.get_dim("nI")
b = model.get_param("b")
W = model.get_param("W")W = W.reshape((nO * nP, nI))
Y = model.ops.gemm(X, W, trans2=True)
Y += b.reshape((nO * nP,))
Y = Y.reshape((Y.shape[0], nO, nP))
best, which = model.ops.maxout(Y)
After Change
nP = model.get_dim("nP")
nI = model.get_dim("nI")
b = model.get_param("b")
W = cast(Array2d, model.get_param("W"))W = W.reshape((nO * nP, nI))
Y = model.ops.gemm(X, W, trans2=True)
Y += b.reshape((nO * nP,))
Y = Y.reshape((Y.shape[0], nO, nP))
best, which = model.ops.maxout(Y)