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

Connected

Exercise

Building a binary classifier in PyTorch

Recall that a small neural network with a single linear layer followed by a sigmoid function is a binary classifier. It acts just like a logistic regression.

Practice building this small network and interpreting the output of the classifier.

Instructions 1/2

undefined XP
    1
    2
  • Create a neural network that takes a 1x8 tensor as input and outputs a single value for binary classification.
  • Pass the output of the linear layer to a sigmoid to produce a probability.