flâneur — a map of the web's best reading

Chapter 0: Fundamentals - ARENA

learn.arena.education · 3,399 words · saved by 1 readers

In this section, we'll move onto batched operations. First, it's necessary to cover some important tips for working effectively with PyTorch tensors. If you've gone through the prerequisite material then several of these should already be familiar to you. For regular booleans, the keywords and, or, and not are used to do logical operations and the operators &, |, and ~ do and, or and not on each bit of the input numbers. Analogously, we use the operators &, | ~ on tensors to perform these operations on each element of the tensor, e.g. x & y returns the tensor with elements x[i] and y[i]. A few important gotchas here: Einops is a useful library which we'll dive deeper with tomorrow. For now, the only important function you'll need to know is einops.repeat. This takes as arguments a tensor and a string, and returns a new tensor which has been repeated along the specified dimensions. For example, the following code shows how we can repeat a 2D tensor along the last dimension: In plain Pyt

2️⃣ Batched Operations Learning Objectives Learn about some important concepts related to batched operations, e.g. broadcasting and logical reductions Understand and use the einops library Apply this knowledge to create & work with a batch of rays In this section, we'll move onto batched operations. First, it's necessary to cover some important tips for working effectively with PyTorch tensors. If you've gone through the prerequisite material then several of these should already be familiar to you. Tensor Operations - 5 Tips Tip (1/5) - Elementwise Logical Operations on Tensors For regular boo

Explore this link on the map →

related reading