Build a Machine Learning Model without a single line of code!
Tags: machinelearning, tooling, python
Published: 2022-11-25 06:39:32


Machine learning is still a "hard" problem, though. It is undeniably challenging to advance machine learning algorithms scientifically. It calls for imagination, risk-taking, and perseverance. Implementing current techniques and models to make them suitable for your new application remains a challenging topic for machine learning. Machine learning engineers continue to command higher salaries than regular software engineers on the job market.


Since the aforementioned frameworks make machine learning implementations unnecessary, this challenge is frequently not a math problem. Developing an understanding for what tool be used to address an issue is one component of this challenge. This necessitates knowledge of the available algorithms and models, as well as their trade-offs and limitations.


By itself, this skill is learnt through exposure to these models (in lectures, textbooks, and articles), but it is learned even more so by your own attempts to put these models into practice and test them out. But this kind of knowledge construction is not limited to machine learning; it occurs in all branches of computer science. Regular software engineering calls for thoughtful design choices as well as an understanding of the trade-offs of competing frameworks, tools, and approaches.

The problem is that debugging machine learning is inherently challenging. Machine learning requires debugging in two situations: Your algorithm either 1) doesn't work or 2) doesn't work well enough. Machine learning is special in that it is "exponentially" more difficult to pinpoint the problem when something goes wrong.

***But Google simplifies the process by letting the users to train the model with just a single click without any single line of code.***

## What is Teachable Machine ?

The AI-based project Teachable Machine was created by Google, a simpler method for developing machine learning models. It's a web-based platform that everyone can use to quickly, simply, and affordably create machine learning model.

It was released in 2017 and had an update in 2019 that added numerous new features.

Teachable Machine is an easy-to-build project that doesn't require any programming knowledge or prior AI experience. It instructs the computer to carry out a task, to categorize, or to identify. It supports the image, sound, and position recognition models.

Users will be able to train a simple model with the use of images, audio and also video clips for our application without any coding required as datasets for training.

And for all of this you just need setup of a computer & webcam. If you are worried about GPU specifications and accuracy of your model, the teachable Machine is there to solve all your problems.


![Teachable Machine](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hk5xvoq31t2k2p409upd.jpeg)

There are mainly three steps

**i)Gather** : To help the computer learn, gather and classify your examples into the classes or categories you want it to understand. Use a webcam or microphone to record them live, or upload your own Image files.

**ii)Train the Model** : The in-built tensorflow library which tensorflow.js starts training your model and will start a neural network in your browser.

**iii)Test the Model** : Test the model which returns the output of the trained model

It will also provide you the way to download your model.

## Let us do one project

We will now do a cat or dog classification using teachable machine in a minute


![Teachable Machine 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0vjqye43rhf6zxuneh0h.png)

**1)Gather Data** : To help the computer learn, gather and classify your examples into the classes or categories you want it to understand. Use a webcam or microphone to record them live, or upload your own Image files. Here first rename the class 1 as dog and class 2 as cats and upload the image samples or you can record the images using your computer webcam.


![Cats or Dogs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r3c8mes8rza9a77q3jm2.png)

**2)Train Model** : You can now begin training the model. To improve accuracy, you can scroll down to the advanced option and alter the epochs and batch size.

The term "epochs" in neural networks refers to the number of times each dataset sample is fed into the training model. The model is trained better with a higher epoch value.

Each of the training's forward and backward passes constitutes an epoch.

Batch size is the quantity of training instances in a single epoch pass. You will require additional memory space as the batch size increases.


![Trained Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjc7pjec7k42rpxqvhkl.png)

**3)Test Model**: The model is complete. The preview part of the model allows you to test it and verify its accuracy. You can change the settings while the model is being trained if you are unhappy with the outcomes.

Cat :

![Cat Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7j1x8mwy1qfj0ikg993v.png)

Dog : 


![Dog Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p98y5xa0aoy8a5apw8yq.png)

You can also export the created model in different formats and use it in your projects and also share it.


![Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5y3ym6kdvf0hrtb84a3m.png)

You can use the dataset given below to implement the above project
[Cats vs Dogs Dataset](https://www.kaggle.com/c/dogs-vs-cats/data)

**Teachable Machine Link :** https://teachablemachine.withgoogle.com/

**Project Using Teachable Machine :**

https://www.youtube.com/watch?v=OAdegPmkK-o&ab_channel=Google

Thank you Google for providing this wonderful Tool to the developers. Hope you will have fun and learn something new by using this tool.
Happy Learning !!