TensorPlay

Latest development documentation · Updated 2026-09-08. A documentation snapshot for package 1.0.0.dev20260909 is not available.

On this page

tensorplay.nn.functional.cross_entropy

tensorplay.nn.functional.cross_entropy(input, target, weight=None, size_average=None, ignore_index=-100, reduce=None, reduction='mean', label_smoothing=0.0)[source]

Compute the cross entropy loss between input logits and target.

the class-probability path, positive label_smoothing blends the NLL with a smoothed uniform term, and otherwise this is nll_loss(log_softmax(input), target) with N-d support.

See CrossEntropyLoss for details.

Search documentation

Search all 1,743 documentation pages.

Keyboard shortcuts

Global

  • /Focus search
  • ?This dialog
  • ,Open settings
  • jAI assistant

Search

  • Navigate results
  • Open result
  • escClose

Package

  • mMain information
  • dDocs
  • .Code
  • -Changelog
  • tTimeline
  • sStats
  • vVersions