Default

torch.Default
See theDefault companion object
trait Default[+D <: DType]

Default tensor type.

Defaults to float32 but can be overriden by providing providing the DType explicitly, or by overriding the default in the current scope through an import:

Example:

import torch.*

// Default:
nn.Linear(10, 10) // Linear[Float32]

// Override explicitly:
nn.Linear[BFloat16](10, 10) // Linear[BFloat16]

// Override default:
import Default.float64
nn.Linear(10, 10) // Linear[Float64]

Attributes

Companion
object
Source
DType.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def dtype: D

Attributes

Source
DType.scala