Skip to content

For Machine Learning

  • PyTorch
  • Keras
  • TensorFlow
  • Pandas
  • Contact Us
November 27, 2023

How to get a Single Image from PyTorch DataLoader?

UncategorizedPragati

In neural network terminology, an epoch is one pass through all source data. The DataLoader class is designed to be iterated using the enumerate() function, which returns a tuple with the current batch zero-based index value.

October 24, 2023

PyTorch Loss Backward Example

PyTorchPragati

In this tutorial, we will look even further into what is derivative, how to calculate the gradient and explore how a neural network’s actual forward and backward passes are done.

October 19, 2023

Keras Early Stopping Monitor Options (Validation vs Training loss)

KerasPragati

Keras EarlyStopping callback interrupts training once a target metric has stopped improving for a fixed number of epochs. For instance, this callback allows you to interrupt training as soon as you start overfitting, thus avoiding having to retrain your model for a smaller number of epochs. 

October 15, 2023

Difference between ‘register_buffer’ and ‘register_parameter’ of PyTorch Module.

PyTorchPragati

Reason to register the tensor as a buffer is to be able to serialize the model and restore all internal states and buffers and parameters will be pushed to the device if called on the parent model.

October 9, 2023

Extract Intermediate Layer Output from PyTorch CNN model.

PyTorchPragati

We need a way to get access to the activations inside the mode. In PyTorch, this can be done with a hook. Hooks are PyTorch callbacks.

October 3, 2023

PyTorch Access Weight from nn.Sequential Model

PyTorchPragati

A Sequential model is useful for quickly defining a linear stack of layers (i.e., where one layer follows directly from the previous layer without any branching). We can define our MLP model using the Sequential class as shown:

September 30, 2023

Show Progress Bar during Training in Keras

KerasPragati

tqdm can help you create progress bars for training machine learning models. This tutorial will teach you how to implement Progress Bars during training in keras.

September 28, 2023

Install Java on MacOS Apple Silicon M1/M2 Chip

UncategorizedPragati

If you’re using Intel Core then download x64 DMG Installer. If you’re using Apple Silicon M1/M2 Chip then you have to Download ARM64 DMG Installer. I have an Apple M2 Chip so I am going to download Arm 64 DMG Installer.

September 22, 2023

Fix RuntimeError: mat1 and mat2 shapes cannot be multiplied.

PyTorchPragati

The shape mismatch is raised in the first linear layer of self.out as it’s expecting an input activation with 1050 features while the actual activation has 1568 features. Change the in_features of this linear layer to 1568 and it should work.

September 14, 2023

What is a feature map or activation map in convolutional neural networks?

KerasPyTorchPragati

The convolution layer uses filters that perform convolution operations as it is scanning the input with respect to its dimensions. The resulting output is called a feature map or activation map. 

Posts navigation

1 2 … 20 Next

Latest Posts

  • How to get a Single Image from PyTorch DataLoader?
  • PyTorch Loss Backward Example
  • Keras Early Stopping Monitor Options (Validation vs Training loss)
  • Difference between ‘register_buffer’ and ‘register_parameter’ of PyTorch Module.
  • Extract Intermediate Layer Output from PyTorch CNN model.
  • Privacy Policy
Copyright © 2023 For Machine Learning All Rights Reserved.
Powered by WordPress. Designed by Yossy's web service.