You don't have access to this class

Keep learning! Join and start boosting your career

Aprovecha el precio especial y haz tu profesión a prueba de IA

Antes: $249

Currency
$209
Suscríbete

Termina en:

2 Días
14 Hrs
48 Min
39 Seg
Curso de TensorFlow.js

Curso de TensorFlow.js

Alejandro Santamaria

Alejandro Santamaria

Modelo general de utilización

12/21
Resources

What is the general model for using a machine learning model?

The implementation of a machine learning model is a process that, although it may seem complex, follows a set of clear and structured steps. This method ensures that the model works as expected, from initialization to obtaining the desired results. Knowing these steps will allow you to effectively use any model you have developed.

Importing libraries: where to start?

The first essential step when working with a machine learning model is to import the necessary libraries. These can be accessed through a CDN, which makes them easy to use if you are dependent on an Internet connection. However, if you need your application to work exclusively locally, you can choose to download the libraries directly to your computer. This first step is vital as it ensures that you have all the necessary tools and dependencies to proceed to the next step.

Model initialization and loading: how to proceed?

After importing the libraries, the next step is to initialize and load your model. Here you have two options:

  1. Sequential: create a sequential model with the necessary layers that make up your learning model.
  2. Load from an existing model: this is common if you have developed a model previously or if you use a pre-trained one from a web repository or from a local resource in your browser.

Both options require you to be clear about the type of model you need, as well as how it will be used.

Data preparation: what to consider?

To continue, you will need to prepare the data that will be used in the prediction. The data can be:

  • Local, already included in your project or application.
  • Manually entered by the user.
  • Extracted from DOM elements such as images or videos for processing.

It is important to remember that some pre-trained models need the input data to follow a specific format. Therefore, it is crucial to perform normalization and regularization processes to make sure that the data has the right format for the model.

Performing inference: what is the next step?

Once you have loaded the model and prepared the data properly, the next step is to perform inference or prediction. This process involves:

  • Formatting the data so that it is compatible with the model.
  • Execute the prediction using methods such as 'predict'.

For example, if the model predicts the content of an image, it will determine whether it is a dog, a cat or a human. The focus should be on making sure that the data is processed correctly to get accurate results.

How to map the results?

The last step is to map the results in a way that is understandable to users. Many model results come in the form of numerical probabilities that must be associated with specific labels to make sense to users.

Examples of output mapping

  1. Linear Regression: where the model returns data that must be represented as a line on a graph.
  2. Pose Recognition: using a video feed, the model can identify and map key points of a human figure on an image to create an interpretive visualization.

Mapping the results not only helps contextualize the information for end users, but also ensures that the model's prediction is interpreted correctly.


This step-by-step process optimizes the use of machine learning models and ensures that the results are accurate and useful. Becoming familiar with these steps is key for any developer or data scientist looking to get the most out of machine learning models in their projects.

Contributions 10

Questions 0

Sort by:

Want to see more contributions, questions and answers from the community?

Yo sigo perdido .-.

Pasos

  1. Inicializar y cargar modelo

Podremos usar:

  • tf.sequential() para crear un nuevo modelo y entrenarlo o
  • tf.loadLayersModel() para cargar un modelo pre-entrenado.
  1. Preparar datos
  • Los datos podran obtenerse mediante fetch, de almacenamiento validos segun la plataforma, o bien en el navegador de interfaces con video o imagenes.
  • En algunos casos los datos deberan normalizarse o formatearse de acuerdo al formato que el modelo esta esperando (dimensiones especificas o codificaciones en el caso de imagenes).
  1. Realizar interferencia
  • Para esto utilizamos: model.predict()
  1. Obtener y mapear los resultados
  • Recuerda que las predicciones pudieran tener un formato normalizado (si el formato que usaste para entrenar tu red).
  • Una vez revertido el proceso de los datos inferidos, despliegalos de acuerdo a tus necesidades.

Todo bien… estoy siguiendo la ruta…

Pero cuando vamos a codear?

Excelente resumen del proceso de utilización vistos en las clases anteriores

Después de ver los cursos de “Deeplearning ai” y ver este curso me siento que perdí mi tiempo aquí.

Creo que deberían incluir código como lo hacen otros profes en la ruta, me siento perdido aún

cuando empezamos a crear modelos o a usar modelos, no he visto nada de programación, por mas que digan que es necesario aprender teoria, pero hombre, unos ejemplos no te quitan nada de tiempo al fin y al cabo esta plataforma supuestamente te ofrece educación pero ni una linea de código en lo que va de la clase lo he visto escribir, pesima elaboracion del curso, ojo no dije que fuera malo, sino que muy mal estructurado estan, en unos 8 min aprox. explican cosas que ni siquiera lo dejan claro y no vengan con “tienen que investigarlo ustedes” enserio un poco mas de entusiasmo a la educación.

Si la teoria es importante y codear sin ella tampoco es bueno pero deberia estar estructurado el curso de tal manera que se complementen las 2 y no olvidar que la practica refuerza lo aprendido

sorry la teoria aguanta todo y entiendo (creo) las bases pero creo que faltan ejercicios

Siento que puedo escribir una red neuronal fácil mente después de este curso.

… Creo que me saldrá más de 1 bug, deséeme suerte