Neural network using JavaScript

ymtbubzb10Mail report abuse

Hi everybody! I am a professional web developer. My primary programming language is JavaScript. I use JS and its frameworks on the frontend, and I use NodeJS on the backend. Recently I heard about machine learning and all those cool things that can be done using it. I have an interesting idea which I want to implement using the web application and a trained neural network. But it seems that Python is the main programming language for coding neural nets. Can you advise me on whether I need to learn Python or there is a way to develop artificial intelligence using JS? I have never used Python before, so I will need to learn it from scratch.

Answers

MegMit report abuse

You should definitely learn Python. Even Python is often considered as a prototyping language. Many production models are converted from Python to languages like Java or C++. I don't think that neural networks can be effectively coded using JavaScript. However, this is possible because the neural network is nothing that the mathematical model and any programming language can be used to perform mathematical computations.

tiLag8080 report abuse

I wouldn't be so confident about the impossibility to use JS for this. Google recently released Tensorflow.js. This library can be used to perform neural networks training on JavaScript. Moreover, it can be executed on the client-side, directly in the browser! This is amazing. I think we are moving towards developing ML solutions using convenient scripting languages that can operate on the frontend rather than on the backend.

MegMit report abuse

But JavaScript cannot provide such speed that can provide Python!

tiLag8080 report abuse

Python is also not very fast. Java and C++ are faster. Nevertheless, Python is the most popular language for Data Science. Computers become more and more powerful, and I think that the speed of the specific programming languages matters less now than even five years ago.

dEybid report abuse

I agree with (B) that JavaScript is not the standard language for deep learning. Nevertheless, it is possible to do this, and if you don't want to learn Python, you can try to use JS. The particular use case is also matters. How many training data you have, what should be the latency, is this the computer vision task or something else, etc. All these things are important when deciding about is it ok to use JS. But I also want to add that there are several other Javascript libraries for neural network creation (except well-known Tensorflow.js). For example, there are BrainJS (https://brain.js.org/), Synaptic (https://github.com/cazala/synaptic), Neataptic (https://wagenaartje.github.io/neataptic/). I'm sure that there are even more, try to find them in Google if you want.

ymtbubzb10Mail report abuse

I will try TensorflowJS for the POC. Maybe later, I will move to Python. Thanks, everybody!

Add Answer

Need support?

Just drop us an email to ... Show more