A small tip for improving your deep learning experience

Photo by on

Running deep learning experiments can be a daunting task. You schedule a batch of experiments to run overnight to find out the other day that almost all of them failed — and any stack trace whatsoever has been long buried to oblivion by some other test. What a good way to start the day :x. If you, like me, have seen this happen more than you would like to admit, here is a pure Python way to safeguard from lost console messages:

The automatic console-to-file logger

A little Python snippet to mirror any console output to a backup log file.

Highlights of this year report on the AI industry and its trends

Photo by on

Artificial Intelligence (AI) is one of the hottest topics today. Recent advances literally talk for themselves — . AI-discovered pharmaceutics is around the corner. Companies are hiring more Ph. Ds than ever while policy-makers are trying to make sense of this year tech with centuries-old laws. Exciting times for researchers and investors alike, maybe not so much for politicians and lawyers.

This year, for the third time, and teamed up to compile a , covering the latest research, industry, talents, and policy news. Last…

Save up to 90% memory by using the right floats and ints at the right time.

Photo by on

Many of us data scientists deal with massive amounts of information daily. More often than not, these data streams doesn’t fit the available memory, and when this happens, things can get pretty slow — or crash. Buying more RAM isn’t your only option; there are many tricks to use the system memory better. This can be as simple as changing data types or employing smart caching/paging strategies to hide latency.

In this article, I go over the most fundamental way of reducing memory consumption: using the right data-types. …

Getting Started

TLDR, models always take the route of least effort.

Photo by on

Training machine learning models is far from easy. In fact, the unaware data scientist might trip and fall in as many pitfalls as there are living AWS instances. The list is endless but divides itself nicely into two broad categories: underfitting, your model is bad, and overfitting, your model is still bad, but you think it isn’t. While overfitting can manifest itself in various ways, shortcut learning is a recurring flavor when dealing with custom datasets and novel problems. It affected me; it might be affecting you.

Informally, shortcut learning occurs whenever a model fits a problem on data not…

The AI Illustrated Guide

TLDR: Neural networks have fixed sized outputs

Photo by on .

Those working with Neural Networks know how complicated Object Detection techniques can be. It is no wonder there is no straight forward resource for training them. You are always required to convert your data to a COCO-like JSON or some other unwanted format. It is never a plug and play experience. Moreover, no diagram thoroughly explains Faster R-CNN or YOLO as there is for U-Net or ResNet. There are just too many details.

While these models are quite messy, the explanation for their lack of simplicity is quite straight forward. It fits in a single sentence:

Neural Networks have fixed-sized…


Metrics matter and we are following the wrong ones

Photo by on

Four days ago,

“Too many AI researchers think real-world problems are not relevant. The community’s hyperfocus on novel methods ignores what’s really important.”

This isn’t the first article (and won’t be the last) to discuss how the AI community seems to follow an agenda of its own. Large venues blatantly ignore application papers — works focused on applying current methods to real-world problems and the challenges of doing so (which are many). Proceedings are simply out of touch with reality. An extra 10% on object detection is far more valued than a 1% reduction in cancer deaths.

And how to spot bad coding advice

Truck on a Wooden Bridge, by

Every week a “don’t do this” article is posted somewhere. Don’t use inheritance, never write a singleton, scrum is dead. But are we really supposed to abandon it all? Is an if-statement really that bad a thing? How can we tell what advice is worth listening to?

There isn’t a perfect programming language, nor is there a right way to code. There are guidelines (and known pitfalls). Browsing through programming advice on the internet today is terrifying — everyone is telling you to stop doing something. Soon we’ll be out of commands to use. Everything is a source of bugs.

Um poema

Photo by on

Do suor da testa, esculpimos sonhos
Que ardem e derretem em vão ao sol
Escorre o pranto que acumulam tantos
No rio que corre o que clama o canto

O que queres tanto jaz neste rio
Que flui os bens de quem já sorriu
Não pule não, não tente nadar
Pois jamais voltou quem veio do mar

O mar é calmo, certo e simpático
Há tanto espaço qu’eu nem me acho
Não sei se existo, se há outro ser vivo
Nunca fui visto, chorado, lembrado

Subimos ao rio, não há graça no mar
Tant’água em vão sem chão para um lar

A couple of fixes to the original Docker-based tutorial

Photo by on . Object Detection using the code snipped provided in this tutorial

Recently, I needed to run an object detection model for a proof-of-concept I was working on. Since I was using TensorFlow 2, the Object Detection API seemed a good fit. Unfortunately, however, the installation process is far more troublesome than it looks, and are Docker-based, which just seems an unnecessary burden for what ought to be only an ordinary pip package. Long story short, I rolled up my sleeves and went through it, fixing one step at a time until it worked. Here, I present to you how to do it.

Disclaimer: I am not against Docker…

It’s all about subscribing to the right feed

Photo by on

, as Andrew Ng styles it. Every day another application is disrupted by cutting-edge machine learning research. Trying to keep up with the endless stream of new technologies is heart-breaking. If you fancy trying to cope with it, here I present you with what are my top 5 resources for AI-related news and knowledge.

#1 The Batch

The . Each week, it packs recent break-throughs and noteworthy news alongside a short intro by Andrew Ng himself. …

Ygor Rebouças Serpa

Top Writer in AI | Working on Medical Imaging, Action Recognition and Game Development

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store