"""Blocking out the structure of the Neural Network """ import numpy as np class SimpleNN: def __init__(self, architecture): self.architecture = architecture self.weights = [] self.biases = [] # Initialize weights and biases np.random.seed(99) for i in range(len(architecture) - 1): self.weights.append(np.random.uniform( low=-1, high=1, size=(architecture[i], architecture[i+1]) )) self.biases.append(np.zeros((1, architecture[i+1]))) architecture = [2, 64, 64, 64, 1] # Two inputs, two hidden layers, one output model = SimpleNN(architecture) print('weight dimensions:') for w in model.weights: print(w.shape) print('nbias dimensions:') for b in model.biases: print(b.shape)