Open stevengogogo opened 1 year ago
self.W1 = np.random.randn(self.Top[0], self.Top[1]) / np.sqrt(self.Top[0])
self.B1 = np.random.randn(1, self.Top[1]) / np.sqrt(self.Top[1]) # bias first layer
self.W2 = np.random.randn(self.Top[1], self.Top[2]) / np.sqrt(self.Top[1])
self.B2 = np.random.randn(1, self.Top[2]) / np.sqrt(self.Top[1]) # bias second layer
Top = [input, hidden, output] = [5, 10, 5]
$$N_{params} = Top[0] \times Top[1] + Top[1] + Top[1] \times Top[2] + Top[2]$$
Check instructure built by haiku.
Implementation
Code of BNN
References