Techno Blender
Digitally Yours.
Browsing Tag

Keras

Image generation with diffusion models using Keras and TensorFlow

Using Diffusion to generate imagesYou must have heard of Dall-E 2. Published by Open AI, which is a model that generates realistic looking images from a given text prompt. You can check out a smaller version of the model here.Ever wondered how it works under the hood? Well… it uses a new class of generative technique, called ‘diffusion’. The idea was proposed by Sohl-Dickstein, et al in 2015, where essentially, a model generates an image from Noise.But why use diffusion models when there are GANs around?GANs are great at…

Mamba: SSM, Theory, and Implementation in Keras and TensorFlow

Understanding how SSMs and Mamba work, along with how to get started with implementing it in Keras and TensorFlow.Source: AI Generate (SDXL)Submitted on 1st December, 2023 on arXiv, the paper titled “Mamba: Linear-Time Sequence Modeling with Selective State Spaces” proposed an interesting approach to sequence modeling. The authors — Albert Gu, Tri Dao — introduced, ‘Mamba’ that utilized ‘selective’ state space models (SSM) to achieve results that compete with the performance of the, now ubiquitous, Transformer…

10 Best Keras Datasets for Building and Training Deep Learning Models

Too Long; Didn't ReadKeras provides a high-level API that simplifies the process of building and training complex neural network models. With a wide range of pre-built layers and functions, developers can easily build and train deep learning models. Keras also supports GPU acceleration for training and inference, making it a popular choice for both research and industry applications. Too Long; Didn't ReadKeras provides a high-level API that simplifies the process of building and training complex neural network models.…

How to Set Started with TensorFlow Using Keras API and Google Colab | by Jonas Dieckmann | Jan, 2023

Step-by-step tutorial to analyze human activity with neuronal networksImage by Serghei Trofimov on UnsplashThis beginner tutorial aims to give a brief overview of the fundamentals of TensorFlow and to guide you through a hands-on project. The tutorial might be of value to you, if:you have built your first traditional machine learning models and now you are curious about how to get started with your first TensorFlow model.you have explored the basic concepts of TensorFlow already but you are looking for a practical…

How to use custom losses with custom gradients in TensorFlow with Keras | by Michael Parkes | Dec, 2022

Keras does a great job of abstracting low-level details of neural network creation so you can focus on getting the job done. But, if you’re reading this, you’ve probably discovered that Keras’ off-the-shelf methods cannot always be used to learn your model’s parameters. Perhaps your model has a gradient that cannot be calculated through the magic of autodiff, or your loss function does not conform to the signature my_loss_fn(y_true, y_pred) mentioned in Keras’ documentation. If you found the online documentation wholly…

How to Build TensorFlow Models with the Keras Functional API | by Derrick Mwiti | Nov, 2022

Examples and code for building custom models with Keras Functional APIPhoto by Marvin Meyer on UnsplashThe Keras Functional API provides a way to build flexible and complex neural networks in TensorFlow. The Functional API is used to design networks that are not linear. In this article, you will discover that the Keras Functional API is used to create networks that:Are non-linear.Share layers.Have multiple inputs and outputs.We used the Sequential API in the CNN tutorial to build an image classification model with Keras…

Traffic Signs Recognition using CNN and Keras in Python

We always come across incidents of accidents where drivers’ Overspeed or lack of vision leads to major accidents. In winter, the risk of road accidents has a 40-50% increase because of the traffic signs’ lack of visibility. So here in this article, we will be implementing Traffic Sign recognition using a Convolutional Neural Network. It will be very useful in Automatic Driving Vehicles.Convolutional Neural Networks A convolutional Neural Network is a Deep Learning network used to pick up features from the image.…

Implementing the Transformer Decoder from Scratch in TensorFlow and Keras

Last Updated on October 26, 2022 There are many similarities between the Transformer encoder and decoder, such as their implementation of multi-head attention, layer normalization, and a fully connected feed-forward network as their final sub-layer. Having implemented the Transformer encoder, we will now go ahead and apply our knowledge in implementing the Transformer decoder as a further step toward implementing the complete Transformer model. Your end goal remains to apply the complete model to Natural Language…

Hands-On Tutorial for Applying Grad-CAMs for Explaining Image Classifiers Using Keras and TensorFlow | by Aditya Bhattacharya | Oct, 2022

Learn how to apply Grad-CAM using Keras and TensorFlow for explaining deep learning-based image classifiersOutput of Grad-CAM method for explaining image classifiers (image by author, base image source: Unsplash)Classical machine learning (ML) algorithms are not efficient as compared to deep learning (DL) algorithms when applied to unstructured data such as images and text. Due to the benefit of automatic feature extraction in DL as compared to manual feature engineering in classical ML, DL algorithms are more efficient…

How to Implement Scaled Dot-Product Attention From Scratch in TensorFlow and Keras

Having familiarised ourselves with the theory behind the Transformer model and its attention mechanism, we’ll be starting our journey of implementing a complete Transformer model by first seeing how to implement the scaled-dot product attention. The scaled dot-product attention is an integral part of the multi-head attention, which in turn, is an important component of both the Transformer encoder and decoder. Our end goal will be the application of the complete Transformer model to Natural Language Processing (NLP). In…