pytorch / pytorch/tutorials

A short tutorial showing the input arguments for NLL loss/ cross entropy loss would be incredibly helpful

Open
#437 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

The arguments NLL loss (and by proxy cross entropy loss) take are in a relatively weird format. The documentation for the function does all it can within reason of the original documentation, but there's an incredible number of questions posted about weird problems giving them the kind of arguments. Much more than for other comparable things, and most don't really have good reusable answers.

The obvious solution to this is for someone to create a simple example based tutorial of using NLL loss, and clearly showing exactly what format the arguments need to be in (perhaps starting with input and targets that are one hot encoded to make it as idiot proof as possible).

I've spent 4 hours trying to solve a problem exactly like this without success, and am about to refer to source over it. Someone please take mercy on future programmers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing NLL loss and cross entropy documentation and the repository's tutorial structure first. Create a small tutorial that demonstrates the required input and target formats, including the requested one-hot-encoded starting example, and consider the work done when common argument-shape questions are answered clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.