# This pattern is the same for more inputs and weights. Weights and inputs have the same length
# inputs = [1, 2, 4]
# weights = [0.2, 0.8, -0.5]
# bias = 2

# output = inputs[0] * weights[0] + inputs[1] * weights[1] + inputs[2] * weights[2] + bias

# print(output)


# With multiple layers
# inputs = [1, 2, 3, 2.5]

# weights1 = [0.2, 0.8, -0.5, 1]
# weights2 = [0.5, -0.91, 0.26, -0.5]
# weights3 = [-0.26, -0.27, 0.17, 0.87]

# bias1 = 2
# bias2 = 3
# bias3 = 0.5

# outputs = [
#     # Neuron 1:
#     inputs[0] * weights1[0]
#     + inputs[1] * weights1[1]
#     + inputs[2] * weights1[2]
#     + inputs[3] * weights1[3]
#     + bias1,
#     # Neuron 2:
#     inputs[0] * weights2[0]
#     + inputs[1] * weights2[1]
#     + inputs[2] * weights2[2]
#     + inputs[3] * weights2[3]
#     + bias2,
#     # Neuron 3:
#     inputs[0] * weights3[0]
#     + inputs[1] * weights3[1]
#     + inputs[2] * weights3[2]
#     + inputs[3] * weights3[3]
#     + bias3,
# ]

# print(outputs)


# A more organized way
# inputs = [1, 2, 3, 2.5]
# weights = [[0.2, 0.8, -0.5, 1], [0.5, -0.91, 0.26, -0.5], [-0.26, -0.27, 0.17, 0.87]]
# biases = [2, 3, 0.5]

# # Output of current layer
# layer_outputs = []
# # For each neuron
# for neuron_weights, neuron_bias in zip(weights, biases):
#     # Zeroed output of given neuron
#     neuron_output = 0
#     # For each input and weight to the neuron
#     for n_input, weight in zip(inputs, neuron_weights):
#         # Multiply this input by associated weight
#         # and add to the neuron’s output variable
#         neuron_output += n_input * weight
#     # Add bias
#     neuron_output += neuron_bias
#     # Put neuron’s result to the layer’s output list
#     layer_outputs.append(neuron_output)

# print(layer_outputs)


# How to calculate a dot product
# a = [1, 2, 3]
# b = [2, 3, 4]

# dot_product = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]
# print(dot_product)


# With NumPy
# import numpy as np

# inputs = [1.0, 2.0, 3.0, 2.5]
# weights = [0.2, 0.8, -0.5, 1.0]
# bias = 2.0


# outputs = np.dot(weights, inputs) + bias

# print(outputs)


# Three neurons
# import numpy as np

# inputs = [1.0, 2.0, 3.0, 2.5]
# weights = [[0.2, 0.8, -0.5, 1], [0.5, -0.91, 0.26, -0.5], [-0.26, -0.27, 0.17, 0.87]]
# biases = [2.0, 3.0, 0.5]


# layer_outputs = np.dot(weights, inputs) + biases

# print(layer_outputs)


# import numpy as np

# a = [1, 2, 3]
# print(np.array([a]))


# a = [1, 2, 3]
# print(np.expand_dims(np.array(a), axis=0))


# import numpy as np

# a = [1, 2, 3]
# b = [2, 3, 4]

# a = np.array([a])
# b = np.array([b]).T


# print(np.dot(a, b))


# import numpy as np

# inputs = [[1.0, 2.0, 3.0, 2.5], [2.0, 5.0, -1.0, 2.0], [-1.5, 2.7, 3.3, -0.8]]
# weights = [[0.2, 0.8, -0.5, 1.0], [0.5, -0.91, 0.26, -0.5], [-0.26, -0.27, 0.17, 0.87]]
# biases = [2.0, 3.0, 0.5]

# layer_outputs = np.dot(inputs, np.array(weights).T) + biases

# print(layer_outputs)


# import numpy as np
# import nnfs

# nnfs.init()

# print(np.random.randn(2, 5))
# print(np.zeros((2, 5)))


import numpy as np
import nnfs

nnfs.init()

n_inputs = 2
n_neurons = 4

weights = 0.01 * np.random.randn(n_inputs, n_neurons)
biases = np.zeros((1, n_neurons))

print(weights)
print(biases)
