Principle #1: Focus on the principles

Jorge Guerra Pires, PhD
IdeaCoding Lab
Published in
1 min readMar 11, 2024

--

This means that whenever you see something complex, that you cannot understand, do not focus on details, but on the principles.

For instance, I have studied the Teachable Machine repository on GitHub, it is complex. I wanted to understand how it works since their documentation is not clear, and I have been using this platform constantly. I have tried to replicate it in Angular, but things got complex. Then, I have focused on the principles. Teachable Machine is a library built on top of TensorFlow.js using transfer learning. After that, I started to look for the principles: transfer learning is using a feature model and training a head for your network. I already knew the principles from my studies.

I started to look for the base model, which most likely would MobileNet. I knew the basics, therefore, I had to find the pieces. The code was hard to understand since the programmer styles was different from my, how they organized the functions, the coding. Once I have found the MobileNet loading part, I need where they were transforming the image into features, and then where they would train the head of the network. Different from me, they did not did that in sequence. The first transformed all the images into features, and treated the training as any training. Notwithstanding the difference in organization of the code, they followed the general principle from transfer learning with TFJS. Without this, it would be impossible to make sense of the code.

--

--

Jorge Guerra Pires, PhD
IdeaCoding Lab

Independent Researcher and writer at Amazon | “I want thinkers, not followers!” | More: https://linktr.ee/jorgeguerrapiresphd