Skip to content

knowledge Transfer

  • PyTorch
  • Keras
  • Flutter
  • TensorFlow
  • Pandas
  • Android
  • Contact Us
January 18, 2022

Calculating the number of Parameters in PyTorch Model.

PyTorchPragati

The total number of parameters is shown at the end, which is equal to the number of trainable and non-trainable parameters. In this model, all the layers are trainable. 

January 3, 2022

Load Pandas Dataframe using Dataset and DataLoader in PyTorch.

PyTorchPragati

Create a custom Dataset and DataLoader to preprocess the time series like data into a matrix-like shape. We reshape the data in that way to just illustrate the point. 

December 23, 2021

How to implement softmax and cross-entropy in Python and PyTorch

PyTorchPragati

The softmax activation function transforms a vector of K real values into values between 0 and 1 so that they can be interpreted as probabilities. The input values can be positive, negative, zero, or greater than one.

December 13, 2021

When to use “categorical_accuracy vs sparse_categorical_accuracy” in Keras

KerasPragati

One advantage of using sparse categorical cross-entropy is it saves time in memory as well as computation because it simply uses a single integer for a class, rather than a whole vector.

December 6, 2021

How to deactivate dropout layers while evaluation and prediction mode in Keras?

KerasPyTorchPragati

Forcing your network to learn redundant representations might sound very inefficient. But in practice, it makes things more robust and prevents overfitting. It also makes your network act as if taking the consensus over an ensemble of networks.

October 7, 2021

Calculate Output Size of Convolutional and Pooling layers in CNN.

KerasPragati

As we go deeper in the neural network typically you start off with larger images [32x32x3] then the height and width will gradually trend down as you go deeper in the neural network. Whereas the number of channels generally increases. You see this general trend in a lot of other convolutional neural networks.

September 25, 2021

Create DataLoader with collate_fn() for variable-length input in PyTorch.

PyTorchadmin

A custom collate_fn can be used to customize collation, e.g., padding sequential data to a max length of a batch.collate_fn is called with a list of data samples at each time. It is expected to collate the input samples into a batch for yielding from the data loader iterator. 

September 17, 2021

Feature extraction from an image using pre-trained PyTorch model

PyTorchadmin

The pre-trained model is “frozen” and only the weights of the classifier get updated during training. In this case, the convolutional base extracted all the features associated with each image

September 6, 2021

How to add L1, L2 regularization in PyTorch loss function?

Uncategorizedadmin

In this tutorial, we’ll discuss what regularization is and when and why it may be helpful to add it to our model.

August 21, 2021

Load custom image datasets into PyTorch DataLoader without using ImageFolder.

PyTorchadmin

PyTorch provides many classes to make data loading easy and code more readable. In this tutorial, we will see how to load and preprocess/augment custom datasets.

Posts navigation

Previous 1 2 3 … 20 Next

Recent Posts

  • Advantage of using logs softmax vs softmax vs crossentropyloss in PyTorch
  • How to create a Contiguous tensor in Pytorch?
  • Advantages of ReLU vs Tanh vs Sigmoid activation function in deep neural networks.
  • Find Correlation between features and target using the correlation matrix.
  • Multiple scatter plots in single plot in Pandas using Matplotlib.
  • Privacy Policy
Copyright © 2022 knowledge Transfer All Rights Reserved.