from utils.sigmoid import sigmoid import numpy as np from scipy.special import softmax def forward_pass(w1, b1, w2, b2, data): # compute the forward pass of the MLP with sigmoid activations for the hidden layer and softmax for the output layer z1 = np.matmul(data, w1) + b1 a1 = sigmoid(z1) z2 = np.matmul(a1, w2) + b2 a2 = softmax(z2, axis=1) return a1, a2