Learn R Programming

torch (version 0.14.2)

torch_manual_seed: Sets the seed for generating random numbers.

Description

Sets the seed for generating random numbers.

Usage

torch_manual_seed(seed)

local_torch_manual_seed(seed, .env = parent.frame())

with_torch_manual_seed(code, ..., seed)

Arguments

seed

integer seed.

.env

environment that will take the modifications from manual_seed.

code

expression to run in the context of the seed

...

unused currently.

Functions

  • local_torch_manual_seed(): Modifies the torch seed in the environment scope.

  • with_torch_manual_seed(): A with context to change the seed during the function execution.