Library

All tutorials

Every Liberian Geek guide, newest first. Browse by topic from the menu, or search for the task you need.

1,384 guides · page 35

For Loop in Python

While working in Python programming language, users may need to write and repeat the same block of code again and again. For example, they may need to display a particular message 50 times. It is a difficult and time-consuming approach to write the same message again...

How to Get BCE Loss in PyTorch?

Machine Learning is the process of teaching machines and deep learning does the same but uses the neurons to build the structure of the model. The structure consists of multiple layers of neurons and the machines use them to perform multiple iterations to train the...

How to Copy a Tensor in PyTorch?

Copying a tensor can be useful for multiple reasons like building backups for security reasons as they contain important data structures for the models. The user can only copy the structure or hierarchy of the tensor so it can be used with multiple models containing...

Calculate NLL Loss in PyTorch

PyTorch is the framework for designing and training Deep Learning models to make better predictions using neural network architecture. These models are evaluated by comparing the predictions with the actual training data and finding the difference between them....

Reshape Tensors in PyTorch

PyTorch is the framework containing dependencies for building Deep Learning (DL) models using tensors to store data. Tensors are the multi-dimensional data structure for PyTorch to store and manage data in a uniform datatype. The data stored in the tensors is used to...

How to Shuffle PyTorch Tensor?

Artificial Intelligence is the process of teaching the machine based on the provided data to make predictions about future events. PyTorch framework is used to optimize deep learning models and the tensors are used to store the data that is going to be used in...

How to Calculate L1/MAE Loss in PyTorch?

Loss in Machine Learning and Deep Learning algorithms provides a statistical value that enables the model to improve and get optimal results. While training the model, it is very crucial to take the appropriate loss function as an indicator to monitor its performance....