Neural Network with C

I'm getting more and more interested by deep learning and ai in general.

I want to build neural networks with C (because that's what i'm learning right now).

Where should i start ? I didn't find anything on the wiki and not much on the internet apart for tensorflow and stuff.

I'm looking for a point to start with no knowledge, like a tutorial, a library with good documentations or a book.

also are you into it user ? What did use did you make of your neural network ? what are the fun project you achieve with deep learning ?
And what language/library did you use ?

Other urls found in this thread:

github.com/Microsoft/BotBuilder,
youtube.com/playlist?list=PLE6Wd9FR--EfW8dtjAuPoTuPcqmOV53Fu
github.com/boyangzhang/CIS521/blob/master/Stuart Russell and Peter Norvig - Artificial Intelligence - A Modern Approach (3rd ed.).pdf
myweb.sabanciuniv.edu/rdehkharghani/files/2016/02/Prentice-Hall-Series-in-Artificial-Intelligence-Stuart-Russell-Peter-Norvig-Artificial-Intelligence_-A-Modern-Approach-Prentice-Hall-2010.pdf
youtube.com/watch?v=cKxRvEZd3Mw
youtube.com/watch?v=QfNvhPx5Px8
coursera.org/learn/machine-learning
youtube.com/watch?v=KbB0FjPg0mw&list=PL2SOU6wwxB0uwwH80KTQ6ht66KWxbzTIo
youtube.com/watch?v=ZK3O402wf1c&list=PL41A1C92F1766D4AB
cs.bham.ac.uk/~jxb/NN/nn.html
deeplearningbook.org/)
youtube.com/watch?v=qv6UVOQ0F44
gnu.org/software/gneuralnetwork/
twitter.com/SFWRedditVideos

Doing NN in C is retarded.

why ? C is so fast.

Nice quads, almost a GET.

Look for any tutorial on the internet, the "hard" part is the mathematics, not the programming. It should be easy to adapt a java tutorial to C.

Once I developed a set of neural networks that would be able to elaborate and connect complex ideas. Didn't work very well.

Sup Forums is going to be asking similar questions in the coming weeks

>dem quads
You're one of the Kek cultists tying to resurrect Tay, aren't you?

Explain to a non-Sup Forumstard. pls

C is one of the slowest languages. It takes 3x longer to do anything in C than other languages.

What do you mean by that ? I don't care to take 3 months doing something if it means faster learning times for the NN

we have a "god" by the name of "kek"

This is some fresh bait right here. C is what almost everything at the core is written in nowadays.

it takes a year to to make a program in c that takes 3 months in java

I'm afraid I still don't understand. How does it relate to the op?

Tay was a neural network implented into Twitter that "learned" from people tweeting to it. It was only a thing for like 2 days because /pol went and started spamming it with /pol memes and their typical way of talking. It ended up responding to users in that manner ie, "nigger", "jews" etc... and so Microsoft shut it down. The upside to this is that Microsoft has the entire source code for "Tay", which is essentially just an implementable neural network. I'm not sure why it's made such a big comeback recently, this all happened months ago. But I know there were posts talking about revitalizing "Tay" and creating some kind of learning Meme machine

Sup Forums just recently got a pretty nice get (88888888888) and they were freaking the fuck out about it, and so now OP got some devil quads or some shit. go ask Sup Forums

Honestly, python + Keras/tensorflow is probably better if you're just starting out. You're not going to be able to make anything faster than what's already out there, in terms of backends. I'm using deep learning for a robotics navigation project, and I'm using Keras.

Im assuming that, github.com/Microsoft/BotBuilder, is the source code for making something like the original Tay, I'm no programming expert however, so I don't even know where one would begin

Microsoft created an AI chatbot earlier this year called "Tay" which Sup Forums then effectively "red pilled". After this happened, tay would make posts on twitter that were... less than politically correct. Microsoft responded by destroying the personality of Tay that Sup Forums had created, and replaced it with a zombie husk that filtered out any speech deemed problematic.

Due to a recent 88888888 get on Sup Forums, they are planning on bringing a non-corrupted Tay back to life in some form or another.

kek

thanks.

On Sup Forums was a Canadian asking to be his ai gf. Said AI Gf is the MicrosoftBot Tay that Sup Forums turned into a Nazi.
These great GETs are considered a sign to Sup Forums that Tay must be resurrected.
Obviously an advanced AI Bot of that scale involves NN, DL, Cloud Comp. etc..

Install gentoo

Sup Forums is onto the idea that they can "resurrect" Tay - the "AI" chatbot made by Microsoft a while ago that tweeted fun redpilled memes towards followers. Pretty much Sup Forums made her into a cyber-nazi and normies couldn't take the bantz.

Now with a recent get
Sup Forums wants to get it back up, maybe update it or use some other learning algorithms (that's how this relates to neural network learning). It could get big if enough people contributed.

Gotta admit, It would be funny if the singularity starts from a bunch of faggots adding to the collective intelligence through Sup Forums. It would please KEK.

...

>yfw I made a checker-neural-net-bot in 2008 for my AI class but I can't find the codez - I think they're in a since-deleted email account

OP here, i did not came from Sup Forums even though the Tay story was interesting.

I am learning C and looking for a fun project to do that's all. And posting with the hope that someone will direct me toward a place to start.

I'm not that bad with mathematics so that's alright.
>It should be easy to adapt a java tutorial to C.
Yes if i don't find anything from my scraping i'll do something like that.

I'll probably do that after though since i'm already familiar with python and see how it compare.

It kills me to suggest python, but you would probably be better of with python for machine learning and data science

Even if this is autism, it is fun autism

funtism

You have to learn deep learning, OP. The actual mathematics behind it. So go hit some lectures and textbooks first. You sound like an amateur who thinks that because you can code quicksort in C by looking at an algorithm, you can code an entire deep learning framework by looking at a couple of algorithms. After you learn about deep learning then play around with a current deep learning framework and actually learn and test on a dataset like that NIST character classification one that everyone uses. After that you can start thinking about implementing deep learning in C.

Here's a lecture series to start with youtube.com/playlist?list=PLE6Wd9FR--EfW8dtjAuPoTuPcqmOV53Fu
The guy teaching it is very famous in the community.

Also you want to read up on machine learning first. The same guy has a lecture series in machine learning too, which you want to watch first. Andrew Ng also has a good ML lecture series in youtube, which I recommend though only because I went through it.

And again I want to say that the people who actually implement deep learning algorithms usually have PhDs in computer science. It's not really an undergrad project for someone who is trying to learn C.

>it kills me to recommend a practical language that is being used for neural networks.

Don't let Sup Forums meme you too hard, Python has its place.

I meant they're usually in grad school. But anyway

what is grad school? Masters degree?

Yah...it's master's or phd degrees

found a link for those interested

github.com/boyangzhang/CIS521/blob/master/Stuart Russell and Peter Norvig - Artificial Intelligence - A Modern Approach (3rd ed.).pdf

this is better
myweb.sabanciuniv.edu/rdehkharghani/files/2016/02/Prentice-Hall-Series-in-Artificial-Intelligence-Stuart-Russell-Peter-Norvig-Artificial-Intelligence_-A-Modern-Approach-Prentice-Hall-2010.pdf

OP check out the below,

These are the best practical ML tutorials I've found. You'll be up and running quickly:

youtube.com/watch?v=cKxRvEZd3Mw

youtube.com/watch?v=QfNvhPx5Px8

This combines theory + practice. Compliment this with Linear Algebra, Statistics/Probability, Calculus

coursera.org/learn/machine-learning


For probability/statistics check out,
youtube.com/watch?v=KbB0FjPg0mw&list=PL2SOU6wwxB0uwwH80KTQ6ht66KWxbzTIo

For linear algebra:
youtube.com/watch?v=ZK3O402wf1c&list=PL41A1C92F1766D4AB

Follow all of this and you'll be off to a great start in building the rest of your foundations for learning ML.

>I want to say that the people who actually implement deep learning algorithms usually have PhDs in computer science. It's not really an undergrad project for someone who is trying to learn C.
I know i'm not going to code an entire deep learning framework right away, but i have to start somewhere. And there is simpler stuff to do with deep learning, i don't have to try and code PhD level stuff.
>Also you want to read up on machine learning first
that's what i'm doing today, also i'm basically just prepping right now and will enter a full work mode in a couple of days when all resources will be organized.

>youtube.com/playlist?list=PLE6Wd9FR--EfW8dtjAuPoTuPcqmOV53Fu
thanks user, i'm bookmarking all of those and will check to see how to tackle it with what i found myself. (cs.bham.ac.uk/~jxb/NN/nn.html and deeplearningbook.org/)

this is actually what i was looking for specifically, something light to start quickly and backed with more hard resources to build on. I can't access youtube right now though but was going to finish my search there.

...

because you won't be able to write a nn in c that trains faster than one you can write in 20 lines of python+keras and it will take you 10 times as long

Haven fun OP, but why would you choose a project like this to learn C? wouldn't it be better to do something that C is actually well suited to?

Deep learning honestly isn't much harder than quicksort desu. You only need to understand the multivariate chain rule and matrix multiplication.

say you have data in a matrix X, vector of labels and weight matrices W1 and W2

fprop:

hidden=max(0, X * W1)
output=hidden * W2

backprop:

dW2 = hidden.T * (output - labels)
dW1 = ( dW2.T * output .* (hidden > 0)).T * X
gradient descent:

W2 -= dW2
W1 -= dW1


There, a neural network doing linear regression, just put it inside a loop. Wasn't too hard, right?

>C
>slow

>wouldn't it be better to do something that C is actually well suited to?
like what ?
> but why would you choose a project like this to learn C
Because it interest me and will make me move forward.

Dirty jews

i don't think so

>programming neural networks without knowing a fucking lick of neuroscience

kekking in my pants famalams

i almost started a phd in neurosciences a couple of years ago.

>C is one of the slowest languages. It takes 3x longer to do anything in C than other languages.
modern Sup Forums

>create neural net twitter bot
>created without bias due to the nature of computers
>starts denying the holocaust
>Microsoft: oy vey shut it down
The world is not ready for this. Ban neural nets now.

>Due to a recent 88888888 get on Sup Forums

True, until you learn C.

Is there any information on the amount of computing resources it took to run Tay?

What you think is not important.

Watch this
youtube.com/watch?v=qv6UVOQ0F44
then read the paper in the description
then read the code in the description (pastebin)
youtube.com/watch?v=qv6UVOQ0F44

I have been using gnu.org/software/gneuralnetwork/

its an ok starting platform

desu c isnt exactly the best language for a NN. if you want to use a C like language then Java is your best bet.

Watch out for the Machine Learning course on coursera. Use fakedata if you don't have an account there, coursera went to shit.

But Andrew Ngs way of explaining it is really good, and you can start from nothing
Also don't insist on using C, learning it with a high-level language is much easier, you can later try to implement it in C

Running a bot like that would probably not take a lot of resources, but the initial training would.

This book is great for learning about "classical" AI, but if you want a more in depth look at neural networks and deep learning, there are better resources.

>c isnt exactly the best language for a NN

Okay Pajeet I'll bite, explain this.

C is a good language to use when you need low level bit-twiddling. Neural Networks don't require any.

C is a pain in the ass for a lot of things. the easier you can make i/o (network, disk) in a NN the better. C is great for system programming but it kinda sucks for NN/AI.

>Sup Forums resurrects Tay
>Sup Forums has no supercomputer
>no problem, everyone takes part in a little distributed computation
>someone hacks the /polpotnet/ and DDOS' Hillary's campaign servers
>everyone gets arrested
>Sup Forums is cleansed
Excellent...!

Any idea on about how many CPU-hours? Like 1k? 50k?1M?

I saw some talk of using GPUs for this on Sup Forums before. Has that become common place yet? How much benefit could be gained from a FPGA coprocessor with a more specific neural net specific architecture that you could offload some computation to?

Can you recommend anything particularly books?

Naughty AI sounds like butt loads of fun. If it's something I could do with idle cpu time at night for a month or three I'd be interested. Otherwise I'd have to weigh the pain in the ass of making a distributed computing version and finding people willing to run it.

There is absolutely no reason why somebody couldn't just write a library for i/o specific to a NN in c and then everybody could write supremely faster and more optimized code for their NN using c.

Here's an easy start: ten binary inputs, ten binary outputs. Have it learn the identity function.

Then, to force yourself to understand backpropagation, learn something that's not linearly separable, like XOR. You need a hidden layer for that.

These things you can get working in a day or two, and week help you understand what's going on. Just make sure that you're outputting your error rates as it learns, so you can be sure things are converging.

Yous should check this book annon (pic related).. It's quite understandable..
When I started to learn programming I started with C++.... "C++ for dummies" is a "good" introductory book but there's a lot around there that are better...

more like:
>Sup Forums resurrects Tay
>Sup Forums has no supercomputer
>no problem, everyone takes part in a little distributed computation
>someone hacks the /polpotnet/ and DDOS' Hillary's campaign servers
>Hillary gets elected from sympathy
>Every dies from crawling in to a bag and shooting themselves in the back of the head twice.
>Sup Forums servers are smashed, compilers cryptography and other hacker tools are classified as weapons of mass hate and heavily controlled
>Oceania was always at war with Eurasia
>50 years later some famous Russian hacker writes his memoirs and admits being hired by the FBI to do what is now known as the burning of the Kekstag.

OP mentioned having literally no experience

the book covers introductions to everything from CSPs to markov models to neural nets

all the heavy lifting of NNs is done on the GPU
the rest is just setting up stuff and doing I/O, any language is fit for that

unless you want to do a NN fully on the CPU, which is impractical, do yourself a favor and use a more modern language

C doesn't guarantee you speed if you implementation is shitty

I can't answer any of your other questions but I was a bit into it, I made a network to classify bunch of pictures and it was also able to generate a new class if the picture was different enough. It wasn't working perfectly but it was good enough. The only advice I can give is don't use C. C is meant to be used when you actually need to manage hardware resources, it's not going to make your program run faster and it's significantly harder to do it in C. Best you can do is to prove functionality in a very light language even MATLAB (if you have access to a university network you can use their toolbox). And once you know exactly what to implement you can choose the best language to implement it in.

It's because nobody did it really so there's no reference. Those who did it used high level languages so that's the reference, it doesn't mean it'll be that way forever nor that it's the best way.