by Michael Stolzer | Nov 22, 2023 | How-To/Tips
The normal distribution is often utilized in statistics and probability where data is symmetrically distributed around the mean. It shows that data near the mean more frequently occurred than data far from the mean. Sometimes, users may be required to generate random...
by Michael Stolzer | Nov 22, 2023 | How-To/Tips
In PyTorch, the “torchvision.transforms” module has a collection of classes and functions to apply different transformations on desired images including rotating, cropping, resizing, and many more. It provides the “RandomResizedCrop()” method to crop a random area of...
by Michael Stolzer | Nov 22, 2023 | How-To/Tips
Binary cross entropy is a logarithmic loss function utilized in machine learning. It computes the difference between the estimated probabilities of a model and actual labels of data. Sometimes, users may need to find/compute the binary cross entropy between two (input...
by Michael Stolzer | Nov 22, 2023 | How-To/Tips
In PyTorch, tensors are the fundamental data structure that can have multiple dimensions. Sometimes, users may want to determine the k-th and top “k” elements of a specific tensor in various machine learning, data analysis, and deep learning tasks. PyTorch provides...
by Michael Stolzer | Nov 22, 2023 | How-To/Tips
PyTorch is a machine-learning library that offers various modules to work with images. The “torchvision.transforms” module from the PyTorch package has a collection of classes and functions to perform various transformations on images including cropping,...
by Michael Stolzer | Nov 22, 2023 | How-To/Tips
Bernoulli distribution is commonly used in statistics. It is a discrete probability distribution that conducts the outcome (single or failure) of a specific experiment. Its outcomes are usually labeled as “1” and “0”, where 1 symbolizes “success” and 0 defines...