FunctionRacerProblemsRace

Twice Plus One

BeginnerPyTorchPython

Return a tensor with every element of x doubled, and then 1 added to it.

Example 1

x [1.0,2.0,-3.0]
returns [3.0,5.0,-5.0]

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More PyTorch problems