def forward(self, x): W1, b1 = self.params['W1'], self.params['b1'] W2, b2 = self.params['W2'], self.params['b2'] a, fc_cache1 = affine_forward(x, W1, b1) a2, relu_cache = relu_forward(a) out, fc_cache2 = affine_forward(a2, W2, b2) self.cache = (fc_cache1, relu_cache, fc_cache2) return out
def forward(self, x): W, b = self.params['W'], self.params['b'] sigma, mu = self.params['sigma'], self.params['mu'] a, fc_cache = affine_forward(x, W, b) a2, sigmoid_cache = sigmoid_forward(a) out, scale_cache = scale_shift_forward(a2, sigma, mu) self.cache = (fc_cache, sigmoid_cache, scale_cache) return out
def forward(self, x): W = self.params['W'] b = self.params['b'] out, self.cache = affine_forward(x, W, b) return out