Recent Posts by Pragati
How to get a Single Image from PyTorch DataLoader?
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.
Keras Early Stopping Monitor Options (Validation vs Training loss)
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.
Difference between ‘register_buffer’ and ‘register_parameter’ of PyTorch Module.
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.
PyTorch Access Weight from nn.Sequential Model
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:
Install Java on MacOS Apple Silicon M1/M2 Chip
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.
Fix RuntimeError: mat1 and mat2 shapes cannot be multiplied.
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.
What is a feature map or activation map in convolutional neural networks?
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.