def forward(self, X):
        mu = self.W[0].reshape(1, self.W.shape[1])
        pi = self.W[1].reshape(1, self.W.shape[1])
        self.Xshape = X.shape
        X = X.reshape(X.shape[0], 1)
        self.X = X
        Z = np.exp(mu * X + (pi - np.power(mu, 2) / 2))
        Y = Z / np.sum(Z, axis=-1).reshape(X.shape[0], 1)
        self.Z = Z
        self.Y = Y
        return Y
dataset/ETHPy150Open renmengye/imageqa-public/src/nn/ordinal.py/OrdinalRegression.forward/original