1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Deep Learning with PyTorch

Connected

Exercise

Implementing ReLU

The Rectified Linear Unit (ReLU) is a widely-used activation function in deep learning, solving challenges like the vanishing gradients problem.

In this exercise, you'll implement ReLU in PyTorch, apply it to both positive and negative values, and observe the results.

torch.nn package has already been imported for you as nn.

Instructions 1/2

undefined XP
    1
    2
  • Create a ReLU function in PyTorch.