Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Reshaping Tensors | PyTorch Introduction
PyTorch Essentials
course content

Kursusindhold

PyTorch Essentials

PyTorch Essentials

1. PyTorch Introduction
2. More Advanced Concepts
3. Neural Networks in PyTorch

book
Challenge: Reshaping Tensors

Opgave

Swipe to start coding

  1. Reshape the given tensor (with an initial shape of 3x4) into a 2x6 tensor.
  2. Create a view of the reshaped tensor as a 4x3 tensor.
  3. Use the appropriate method to add a new dimension at the third position (index 2) of the tensor.
  4. Use squeeze() to remove the added dimension.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 10
toggle bottom row

book
Challenge: Reshaping Tensors

Opgave

Swipe to start coding

  1. Reshape the given tensor (with an initial shape of 3x4) into a 2x6 tensor.
  2. Create a view of the reshaped tensor as a 4x3 tensor.
  3. Use the appropriate method to add a new dimension at the third position (index 2) of the tensor.
  4. Use squeeze() to remove the added dimension.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 10
Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Vi beklager, at noget gik galt. Hvad skete der?
some-alt