Cross-entropy loss in PyTorch

Cross-entropy loss in PyTorch can be a little confusing. Here is a simple explanation of how it works for people who get stuck.

Pairwise distance in NumPy

You can do vectorized pairwise distance calculations in NumPy (without using SciPy). This lets you extend pairwise computations to other kinds of functions.

Everything is a pipeline

DAGs are everywhere in scientific computing and understanding them is key to running large computations efficiently.

Use informative names

Informative names make programming easier. Here are a few suggestions you can use to write better names in your code.