<jupyter_start><jupyter_text>paperspace tmux - multiple screens tensor = array<jupyter_code>## nomenclature
# error/loss = target - calculated
# non linear - activation functions<jupyter_output><empty_output><jupyter_text>Slide 24, Slide 25 of neuralNetwork.pptx<jupyter_code>import numpy as np
#Slide 25
weights_1 = np.array([[0.71,0.112],[0.355,0.856],[0.268,0.468]])
x = np.array([1,1])
print(weights)
print(x)
y_linear_1 = np.dot(weights,x)
print(y_linear_1)
import math
def sigmoid(x):
    return 1 / (1 + math.exp(-x))
fn_sigmoid = np.vectorize(sigmoid)
y_nonlinear_1 = fn_sigmoid(y_linear_1)
print(y_nonlinear_1)
weights2 = np.array([0.116,0.329,0.708]) # 1x3
y_linear_2 = np.dot(weights2,y_nonlinear_1)
print(y_linear_2)
y_nonlinear_2 = fn_sigmoid(y_linear_2)
print(y_nonlinear_2)<jupyter_output>0.6926974470214398<jupyter_text>Slide 26<jupyter_code>import math

weights_list = []
weights_list.append(np.array([[0.71,0.112],[0.355,0.856],[0.268,0.468]]))
weights_list.append(np.array([0.116,0.329,0.708]))
input_x = np.array([1,1])

def sigmoid(x):
    return 1 / (1 + math.exp(-x))

fn_sigmoid = np.vectorize(sigmoid)

def calc(weight,x):
    y_linear = np.dot(weight,x)
    y_nonlinear = fn_sigmoid(y_linear)
    return y_nonlinear

for weight in weights_list:
    y = calc(weight,input_x)
    input_x = y

print (y)<jupyter_output>0.6926974470214398
{'fraction_non_alphanumeric': 0.15073529411764705, 'fraction_numerical': 0.1, 'mean_word_length': 6.015463917525773, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '678', 'license': 'Apache-2.0', 'n_tokens_mistral': 663, 'n_tokens_neox': 590, 'n_words': 88, 'path': 'series2/week1/week1_class2.ipynb', 'repo_name': 's-ahuja/AI-Saturday', 'size': '1360'}