My Artificial Intelligence Journey - Follow Me Into My Singularity

I used to know some basics coding and am really interested in ML and AI.
However, a BIG problem for me is I got no time to learn them. I wish I got paid learning them... Right now I cant do anything much since I have to make websites/apps to earn money first. damn.
subscribed... following you into singularity.
 
I've been a programmer most all my life. I wish I would have gotten into machine learning algorithms at an early age but for some reason I didn't. I went to college for computer science but I dropped out because most of the things I was to be taught, I already knew. This is not one of those things.

AI is everywhere and certainly in marketing but the average marketer doesn't have access to these algorithms. Not like a programmer does anyway. Machine learning is hard. It takes a lot of maths and dedicated learning. I have recently started down this path (Beyond simply knowing the abstract ideas) so I figured it would be a good idea to chronicle it so that others may benefit and so that in explaining things here, it will better solidify in my brain.

To those ends I have just built a new computer that should be able to handle the algorithms. Here are the parts I've assembled in the machine:


  • Asus X99-E-10G WS Motherboard
  • 32GB Kingston RAM at 3200MHz
  • Intel i7-6850K CPU
  • 512GB Samsung M.2 NVMe NAND SSD
  • 2.5TB of 5 HDD pooled via mergerfs
  • NVIDIA Titan X Pascal GPU
  • Cosmos 2 Case
  • 850W EVGA Power Supply
  • Corsair h100i v2 Liquid CPU Cooler
You don't need a crazy computer like this to learn ML. I just want to be able to train large networks quickly. I have setup my normal environment of Linux + KDE5. The machine flies. I have installed the CUDA development library and compiled Tensorflow with GPU support. Initial test shows TF is using the GPU.

The first long-term goal is to get to a point where I can run predictive analysis of things like ad placements. I think a recurrent neural network would be best for that since they deal with timeseries data. Not 100% sure though. My first step has been to follow a Tensorflow tutorial. I have done that. I don't completely understand what's going on yet but I know a lot more than I did before. Let's go over some of the basics.

What is an artificial neural network?
ANNs are modeled after the biological neural networks in the brain:

h_1501712917_6301304_e34ffaa5f3.png

This is a crude drawing of two neurons. Information flows into the dendrites. Some sort of calculation/function is performed in the nucleus which decides if the neuron is going to fire or not. If it does fire, a signal is sent down the axon and through the synapse to the next neuron.

So here's how we tend to approximate that in computers:


h_1501713806_5650511_da816d460f.png

On the left we have our input data (x1, x2 ,x3). There can be a lot more than 3. In the first tutorial I did, there were 784 input values. Those input values are all summed together but first, they're weighted (w1, w2, w3). You have the original input value multiplied by the weight and then they're all added together (Summed). The neuron, based on the input, will either fire or not. In ANNs, a neuron always produces a value whether it fires or not (1 for fire, 0 for not fire). To determine whether or not it fires, the data gets passed through an activation function:

h_1501714342_6918688_18e0d14aa6.png

This shape above is the shape of an activation function called a step function (You can see why). It means that it's at 0 (Not fire) and if you pass a threshold of x, the return value for y is 1 (Fire). After that, the output of the neuron is fed into the input of another connected neuron:

h_1501714490_6348380_3456f40d56.png

That will continue to happen for as many hidden layers as you have in your ANN. The step function was a good example for illustrating neurons but typically we don't use step functions. This is because step functions produce a 0 or a 1. In ANNs, we want more fine-tuned decisions than that such as a decimal number that can be anything from 0 to 1. To that end, we can use a sigmoid function which looks like this:


h_1501715252_8755492_e922c9bff4.png


Now let's go back to the previous illustration...

h_1501713806_5650511_da816d460f.png



Your output (y) is simply a function of your x's * your w's (Input data times the weights). It's also a function of your activation function. This will be clarified at a later date.

h_1501715768_3423038_ade073ab84.png

We now illustrate a deep neural network. A deep net is simply a neural network which has two or more hidden layers. In my next post I will get into the first code I wrote. I'm using Python 3.6.2 on Linux. If you want to follow along and do this, you'll need to install:

  • Pyenv
  • Python 3 (Via Pyenv)
  • Tensorflow (With GPU support if you have a GPU)
  • A code editor (Such as VS Code)
It's much easier to install Tensorflow on Linux than on Windows. If you're running Windows and don't have the time or patience to install Linux on your machine, you can install Linux in VirtualBox. If you're going to use VirtualBox, I recommend a lightweight Ubuntu-based distro such as Lubuntu. If you're going to install Linux on your computer normally (I very much recommend this), I suggest you use KDE Neon.

You should already have a decent understanding of Python before attempting any of this. If you don't, the official Python tutorial will serve you well. Next time I'm going to attempt to break down training a classifier for the MNIST dataset (Recognizing handwritten digits). All of my posts in this thread will be in blue so you can easily find them. Stay tuned!


This is very great .I subscribed your post .Will read the rest of all and wait for more post from you.
 
A personal assistant like that is possible but would be a ton of work. I saw a similar Kickstarter but it didn't get funded (I don't think it was all that great though).

Got a link of that project or some article? I'd like to read about it. Thank you.
 
I am not a programmer so most of the post went above my head....but AI definitely is the future. I read many articles that AI is already generating content for big media houses using large amounts of structured data. Eg -
http://concured.com/
https://www.kentico.com
http://www.narrativa.com/
https://automatedinsights.com/wordsmith

But what I want to know is that whether content can be generated by feeding video, images, text and unstructured data to a neural network. I found some sites which can generate content using AI. Eg -
http://articoolo.com/
http://contentop.com/
http://www.ai-writer.com
There's also an AI storyteller which creates stories based on an Image...quite interesting! (https://github.com/ryankiros/neural-storyteller)

Just to inform you that IBM released an api for its watson quantum computer (https://developer.ibm.com/dwblog/2017/quantum-computing-api-sdk-david-lubensky/).
Can a neural network run on a desktop computer?

looks like it only needs few edits and it's ready to go. I'm impressed by the output.
 

Attachments

  • Screen Shot 2018-01-13 at 3.59.24 PM.png
    Screen Shot 2018-01-13 at 3.59.24 PM.png
    297.6 KB · Views: 20
You've inspired me to do something in the AI field. I'm working on something amazing :)
figured I might share some of the things I found useful. I really thank you for sparking my interest in this :)

Online info -
Neural Networks: Perceptron Part 1
Mathematics of Gradient Descent - Intelligence and Learning
Neural Networks: Perceptron Part 1
Essence of calculus, chapter 1


Books -
Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems
Introduction to Machine Learning with Python: A Guide for Data Scientists
Python in a nutshell 3rd edition
 
man this thread is a goldmine. did compsci too but have no idea about ai.
 
Just out of interest with neural nets what library are you using? Pytorch? Fast.ai? tensorflow? etc etc
 
OP said he was using tensor flow. I am making one.
Thanks man I must have missed it in the write up.

Yeah im working on learning about NN as well....doing the fast.ai course at the moment
 
Cool stuff here. I subscribed too.

I will follow this thread closely..

Cheers to the OP!
 
Hei, i learn AI for preparation of my final project in my university. The subject i learn is Electronic Engineering. I know AI will be very useful with electronic. I hope you still update this. Thanks
 
But what I want to know is that whether content can be generated by feeding video, images, text and unstructured data to a neural network. I found some sites which can generate content using AI. Eg -
http://articoolo.com/
http://contentop.com/
http://www.ai-writer.com
There's also an AI storyteller which creates stories based on an Image...quite interesting! (https://github.com/ryankiros/neural-storyteller)
Can we use this stuff to write articles for our money sites (after editing, of course)? That'd be amazing.
 
OP, I was going through some of Siraj's videos and in one of them he codes an AI live where he teaches "how to generate your own wiki articles" using LSTM cells. Most of the output is not coherent at all and also not human readable. If we add more layers to the neural network or train it with more data, can it create readable articles?
lstm.jpg
 
Back
Top