A collection of basic techniques for working with tensors in PyTorch — for those who are starting to get acquainted with the framework and want to quickly master its fundamentals.
What's inside:
A good starting material to understand the mechanics of tensors before moving on to models and training.▶️ What tensors are and why they are needed▶️ Tensor initialization: zeros, ones, random, similar size▶️ Type conversion and switching between NumPy and PyTorch▶️ Arithmetic, logical operations, tensor comparison▶️ Matrix multiplication and batch computations▶️ Broadcasting, view(), reshape(), changing dimensions▶️ Indexing and slicing: how to access parts of a tensor▶️ Notebook with code examples
tags: #useful
Please open Telegram to view this post
VIEW IN TELEGRAM
❤7🎉1
1. Makes the first letter capitalized
.capitalize()
2. Lowers or raises the case of a string
.lower()
.upper()3. Centers the string with symbols around it: 'Python' → 'Python'
.center(10, '*')
4. Counts the occurrences of a specific character
.count('0')5. Finds the positions of specified characters
.find()
.index()
6. Searches for a desired object and replaces it
.replace()
7. Splits the string, removing the split point from it
.split()8. Checks what the string consists of
.isalnum()
.isnumeric()
.islower()
.isupper()tags: #useful
Please open Telegram to view this post
VIEW IN TELEGRAM
❤8