A.I, Data and Software Engineering

Tagtensorflow

Advanced Keras – Custom loss functions

petamind

When working on machine learning problems, sometimes you want to construct your own custom loss function(s). This article will introduce abstract Keras backend for that purpose. Keras loss functions From Keras loss documentation, there are several built-in loss functions, e.g. mean_absolute_percentage_error, cosine_proximity, kullback_leibler_divergence etc. When compiling a Keras model, we often...

Continue training big models on less powerful devices

It would not be a surprise that you may not have a powerful expensive machine to train a complicate model. You may experience the problem of not enough memory during training in some epoch. This article demonstrates a simple workaround for this. The problem Training deep learning models requires a lot of computing power. For most laptop and desktop today, you can still train the models but it can...

Generate data on the fly – Keras data generator

Previously, we train our model using the pre-generated dataset, for example, in the recommender system or recurrent neural network. In this article, we will demonstrate using a generator to produce data on the fly for training a model. Keras Data Generator with Sequence There are a couple of ways to create a data generator. However, Tensorflow Keras provides a base class to fit dataset as a...

deep learning: Linear Autoencoder with Keras

This post introduces using linear autoencoder for dimensionality reduction using TensorFlow and Keras. What is a linear autoencoder An autoencoder is a type of artificial neural network used to learn efficient data codings in an unsupervised manner. The aim of an autoencoder is to learn a representation (encoding) for a set of data, typically for dimensionality reduction, by training the network...

Quick Benchmark Colab CPU GPU TPU (XLA-CPU)

If you ever wonder about the performance differences between CPU, GPU, and TPU for your machine learning project, this article shows a simple benchmark for these three. Memory Subsystem Architecture Central Processing Unit (CPU), Graphics Processing Unit (GPU) and Tensor Processing Unit (TPU) are processors with a specialized purpose and architecture. CPU: A processor designed to solve every...

A.I, Data and Software Engineering

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.

Categories