Skip to content

Knowledge Transfer

  • PyTorch
  • Keras
  • Flutter
  • TensorFlow
  • Pandas
  • Android
  • Contact Us
March 26, 2022

Advantages of ReLU vs Tanh vs Sigmoid activation function in deep neural networks.

KerasPyTorchPragati

The saturated neurons can kill gradients if we’re too positive or too negative of an input. They’re also not zero-centered and so we get these, this inefficient kind of gradient update. The third problem is an exponential function. This is a little bit computationally expensive.

March 20, 2022

Find Correlation between features and target using the correlation matrix.

PandasPragati

You can evaluate the relationship between each feature and target using a correlation and selecting those features that have the strongest relationship with the target variable. Such as methods that remove redundant variables using correlation.

March 9, 2022

Multiple scatter plots in single plot in Pandas using Matplotlib.

Pandasadmin

You can keep adding plt.plot as many times as you like. As for multiple scatter plot, you need to specify the color, marker, edgecolor, alpha so you can differentiate them.

March 4, 2022

Plot two overlay Histograms on single chart with Pandas and Matplotlib.

PandasPragati

We’ll look at a real-world example with data that I’ll load from a CSV file and also we’re going to learn how to draw overlapping histograms using Pandas and Matplotlib. Before we go and set up how we create the chart let’s look at what the end results would be.

February 24, 2022

How to copy PyTorch Tensor using clone, detach, and deepcopy?

PyTorchPragati

we want to make a copy of a tensor and ensure that any operations are done with the cloned tensor to ensure that the gradients are propagated to the original tensor, we must use clone(). We should use detach() when we don’t want to include a tensor in the resulting computational graph.

February 18, 2022

Copy PyTorch Model using deepcopy() and state_dict()

PyTorchPragati

The PyTorch model is mutable if we change any of the two models this action will have a direct impact on the other model too, as they both point to the same object reference in memory.

February 2, 2022

PyTorch Linear Layer (Fully Connected Layer) Explained.

PyTorchPragati

The weight matrix defined the linear function this basically demonstrates how the network mapping changes as the weights are updated during the training process when we update the weight we are changing the function.

January 26, 2022

Global Average Pooling in PyTorch using AdaptiveAvgPool

PyTorchadmin

We want to convert this to a tensor of size bs x ch, so we take the average over the last two dimensions and flatten the trailing 1×1 dimension as we did in our previous model. 

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. 

Posts navigation

Previous 1 2 3 … 21 Next

Recent Posts

  • PyTorch Confusion Matrix for multi-class image classification
  • What does model.evaluate() return in keras?
  • Create NumPy array from PyTorch Tensor using detach().numpy()
  • How to use optimizer.zero_grad() in PyTorch
  • Use of ‘model.eval()’ and ‘with torch.no_grad()’ in PyTorch model evaluate
  • Privacy Policy
Copyright © 2022 Knowledge Transfer All Rights Reserved.