Skip to content
Snippets Groups Projects
Commit ff0ad89d authored by Muniz Silva Samuel's avatar Muniz Silva Samuel
Browse files

Upload New File

parent 13f30386
Branches
No related tags found
No related merge requests found
mlp.py 0 → 100644
import numpy as np
import tensorflow as tf
import pandas as pd
def sigm(x):
y = 1 / (1 + np.exp(-x))
return y
def learn_once_mse(w1,b1,w2,b2,data,targests,learning_rate):
return w1,b1,w2,b2,loss
def one_hot(labels):
oneHotMat = np.zeros((labels.size,labels.size),dtype=int)
for index,values in enumerate(labels):
oneHotMat[index,values] = 1
return oneHotMat
def learn_once_cross_entropy():
return
print(one_hot(np.array([1,2,0,4,3])))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment