-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python version of multiple hidden layers neural network library #153
Open
pythonAIdeveloper
wants to merge
48
commits into
deeplearn
Choose a base branch
from
master
base: deeplearn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added link to pull request 61
Dear Diary, I spent the day recording a set of video tutorials about how to do image classification with a simple "toy" neural network. There are lots of problems with this and the goal is purely educational and to have some fun. I hope to improve this example in the future. It could use an intrface and some animations, the softmax function, and working with a larger dataset and ml5/deeplearn.js. yours forever, The Coding Train (choo choo)
nothing to see here yet!
This here is the start of code I need for my neuro-evolution examples. So far I have only implemented "copy()" and "mutate()" ok! I still need to do "crossover()" and implement the GA itself of course. For reference the live stream is here: https://www.youtube.com/watch?v=ASnCXW6pPSY
This adds a test for the `Matrix.copy()` function.
Add Matrix copy() test
The doodle classifier example was missing under the examples list. Also links to the youtube videos coding these examples are added.
Create a README in the xor example
Neuroevolution!
Added a section where the community can reference their own libraries they've built based on this one.
added community contributions
This is a new example with a lot of great help from @meiamsome and more. Discussion in this live stream starting here: https://youtu.be/emjv5tr-m7Q?t=4898
New neuroevolution steering example
Examples added doodleclassifier and Youtube links
Missing semi-colon in matrix.js
Added another Library reference
modified the arguments of the constructor to be self-documenting and added documentation to explain the cloning constructor
modified constructor args to be self documenting
Update README.md
Update README.md
Update README.md
Update README.md
Update README.md
Convolutional Neural Network from scratch in JS. Example is demonstrated on MNIST dataset. The uploaded brain.json contains brain with 80% accuracy on test dataset. The example can be run on browser on : https://therealyubraj.github.io/CNN_JS/ Click on the load button to load pre-trained brain.
Added my implementation of CNN
fixes small typos in README.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
`
import random
import math
def sigmoid(x, a, b):
return 1/(1 + math.exp(-x))
def dsigmoid(y, a, b):
return y * (1 - y)
class Matrix():
def init(self, rows, cols):
self.rows = rows
self.cols = cols
self.data = []
#vector operations
@staticmethod
def MatrixMultiply(m1, m2):
if m1.cols != m2.rows:
return "you did something wrong"
else:
result = Matrix(m1.rows, m2.cols)
for i in range(result.rows):
for j in range(result.cols):
sum = 0
for k in range(m1.cols):
sum += m1.data[i][k] * m2.data[k][j]
result.data[i][j] = sum
return result
#converting array into matrix
@staticmethod
def fromArray(arr):
m = Matrix(len(arr), 1)
for i in range(len(arr)):
m.data[i][0] = arr[i]
return m
#converting matrix into array
def toArray(self):
arr = []
for i in range(self.rows):
for j in range(self.cols):
arr.append(self.data[i][j])
return arr
#scalar operations
def multiply(self, n):
if type(n) == Matrix:
for i in range(self.rows):
for j in range(self.cols):
self.data[i][j] *= n.data[i][j]
else:
for i in range(self.rows):
for j in range(self.cols):
self.data[i][j] *= n
randomization
transposing a matrix
applying a function
printing a matrix
class SingleLayerNewralNetwork():
def init(self, inputNodes, hiddenNodes, OutputNodes):
class MultiLayerNewralNetwork():
if name == 'main':
print("This is a Newral Network Library")
print("-By CHAITANYA JAIN")
`
please please please add it. It is the first time I am ever contributing.
I don't even know how to give my code but i have just tried.