I changed this:
sigmoid + sigmoid + sigmoid + meanSquaredError
relu + relu + sigmoid + binaryCrossentropy
And seems that the prediction is quite better:
[[0.9998419, 4e-7 ],
[0.9998978, 8e-7 ],
[0 , 0.9999998],
[0 , 0.9999999]]
Original article: https://aralroca.com/blog/etiketai
I’d like to tell you why I made Etiketai, a tool that makes it easier to train image recognition AI models (ImageNet, YOLO and its variants) from any device ensuring security.
When we want to directly use existing image recognition models such as ImageNet, COCO-ssd or YOLO, we are limited to predict only everyday objects such as cars, people, etc. This is because these models have only learned to recognize these objects within an image. However, there are techniques such as transfer-learning that allow us to retrain these models to predict what we want.
In order to…
Original article: https://aralroca.com/blog/first-steps-webassembly-rust
We’ll see how to run native code in the browser, doing faster web applications, being able to reuse old code like retro videogames, and at the same time learning the future of web development.
Original article: https://aralroca.com/blog/how-to-draw-gears-in-webgl
In this article we continue what we started in “First steps in WebGL”, where we saw what it is and how it works internally: the shaders, the program, buffers, how to link data from CPU to GPU, and finally how to render a triangle. To understand all this well, I recommend first reading the previous chapter.
Here, instead of rendering a triangle, we’ll see how to render more complex structures and how to give it movement. To do that we’ll implement three dynamic gears:
Original post: https://aralroca.com/blog/static-readme-regeneration
GitHub has recently introduced a “secret” feature to show a markdown template on your profile page. You may have heard about this. All you need to do is create a repo named with your username and create the
README.md file there.
When we think of a template markdown on GitHub we normally think of static content. However, in this article, I want to go a little further. …
Original post: https://aralroca.com/blog/first-steps-in-webgl
In this article, we’ll see what WebGL is and how to draw a triangle by talking to the graphics processing unit (GPU). Although this simple example could be solved in better ways, such as using a canvas with a 2d context or even with CSS, what we want is to start with WebGL. Like a “hello world”, to understand how it works.
Original article: https://aralroca.com/blog/cat-dog-classifier
This is a small tutorial to implement an application that predicts if it’s a cat or a dog image. To do this we’ll use Tensorflow.js to make the prediction directly on the browser.
I recommend reading this other article where I introduce Tensorflow.js.
However, after this, you’ll be able to classify any kind of image in an easy way even without any knowledge of ML. Also, it can be replicated for any image classification problem.
Before we start training a model, we need to have many images of cats and dogs, as varied as possible, to not…
Original article: https://aralroca.com/blog/from-node-to-deno
Last week I published an article about Deno, and how to create a Chat app with Deno and Preact. Since then, many doubts have arisen. Mostly of them are about how to do the same thing we did in Node, but with the new Deno ecosystem.
I’ve tried to collect some of the most used topics in Node, and looked for their alternative with Deno. First of all, I would like to make it clear that we can use many of the current Node.js modules. There is no need to look for an alternative for everything, as…