Transformers have modified the way in which artificial intelligence works, especially in understanding language and learning from data. On the core of those models are tensors (a generalized sort of mathematical matrices that help...
I’ve recently been tinkering with deep learning models in Tensorflow, and have accordingly been introduced to managing data as tensors.As a Data Engineer that works all day in tables that I can easily slice,...
Using torch.index_select, torch.gather and torch.takeIn some situations, you’ll have to do some advanced indexing / selection with Pytorch, e.g. answer the query: “how can I choose elements from Tensor A following the indices laid...