• Learn
    Get Started Tutorials Learn the Basics PyTorch Recipes Intro to PyTorch - YouTube Series Webinars
  • Community
    Landscape Join the Ecosystem Community Hub Forums Developer Resources Contributor Awards Community Events PyTorch Ambassadors
  • Projects
    PyTorch vLLM DeepSpeed Host Your Project
  • Docs
    PyTorch Domains
  • Blogs & News
    Blog Announcements Case Studies Events Newsletter
  • About
    PyTorch Foundation Members Governing Board Technical Advisory Council Cloud Credit Program Staff Contact
  • JOIN
  • Learn
    • Get Started
    • Tutorials
    • Learn the Basics
    • PyTorch Recipes
    • Introduction to PyTorch - YouTube Series
    • Webinars
  • Community
    • Landscape
    • Join the Ecosystem
    • Community Hub
    • Forums
    • Developer Resources
    • Contributor Awards
    • Community Events
    • PyTorch Ambassadors
  • Projects
    • PyTorch
    • vLLM
    • DeepSpeed
    • Host Your Project
  • Docs
    • PyTorch
    • Domains
  • Blog & News
    • Blog
    • Announcements
    • Case Studies
    • Events
    • Newsletter
  • About
    • PyTorch Foundation
    • Members
    • Governing Board
    • Technical Advisory Council
    • Cloud Credit Program
    • Staff
    • Contact
Skip to main content
Ctrl+K

Home

  • Install PyTorch
  • User Guide
  • Reference API
  • Developer Notes
  • Community
  • Tutorials
Ctrl+K
  • X
  • GitHub
  • PyTorch Forum
  • PyPi
  • Install PyTorch
  • User Guide
  • Reference API
  • Developer Notes
  • Community
  • Tutorials
Ctrl+K
  • X
  • GitHub
  • PyTorch Forum
  • PyPi

Section Navigation

  • C++

Python API

  • torch
    • torch.is_tensor
    • torch.is_storage
    • torch.is_complex
    • torch.is_conj
    • torch.is_floating_point
    • torch.is_nonzero
    • torch.set_default_dtype
    • torch.get_default_dtype
    • torch.set_default_device
    • torch.get_default_device
    • torch.set_default_tensor_type
    • torch.numel
    • torch.set_printoptions
    • torch.set_flush_denormal
    • torch.tensor
    • torch.sparse_coo_tensor
    • torch.sparse_csr_tensor
    • torch.sparse_csc_tensor
    • torch.sparse_bsr_tensor
    • torch.sparse_bsc_tensor
    • torch.asarray
    • torch.as_tensor
    • torch.as_strided
    • torch.from_file
    • torch.from_numpy
    • torch.from_dlpack
    • torch.frombuffer
    • torch.zeros
    • torch.zeros_like
    • torch.ones
    • torch.ones_like
    • torch.arange
    • torch.range
    • torch.linspace
    • torch.logspace
    • torch.eye
    • torch.empty
    • torch.empty_like
    • torch.empty_strided
    • torch.full
    • torch.full_like
    • torch.quantize_per_tensor
    • torch.quantize_per_channel
    • torch.dequantize
    • torch.complex
    • torch.polar
    • torch.heaviside
    • torch.adjoint
    • torch.argwhere
    • torch.cat
    • torch.concat
    • torch.concatenate
    • torch.conj
    • torch.chunk
    • torch.dsplit
    • torch.column_stack
    • torch.dstack
    • torch.gather
    • torch.hsplit
    • torch.hstack
    • torch.index_add
    • torch.index_copy
    • torch.index_reduce
    • torch.index_select
    • torch.masked_select
    • torch.movedim
    • torch.moveaxis
    • torch.narrow
    • torch.narrow_copy
    • torch.nonzero
    • torch.permute
    • torch.reshape
    • torch.row_stack
    • torch.select
    • torch.scatter
    • torch.diagonal_scatter
    • torch.select_scatter
    • torch.slice_scatter
    • torch.scatter_add
    • torch.scatter_reduce
    • torch.segment_reduce
    • torch.split
    • torch.squeeze
    • torch.stack
    • torch.swapaxes
    • torch.swapdims
    • torch.t
    • torch.take
    • torch.take_along_dim
    • torch.tensor_split
    • torch.tile
    • torch.transpose
    • torch.unbind
    • torch.unravel_index
    • torch.unsqueeze
    • torch.vsplit
    • torch.vstack
    • torch.where
    • Stream
    • Event
    • Generator
    • torch.seed
    • torch.manual_seed
    • torch.initial_seed
    • torch.get_rng_state
    • torch.set_rng_state
    • torch.bernoulli
    • torch.multinomial
    • torch.normal
    • torch.poisson
    • torch.rand
    • torch.rand_like
    • torch.randint
    • torch.randint_like
    • torch.randn
    • torch.randn_like
    • torch.randperm
    • SobolEngine
    • torch.save
    • torch.load
    • torch.get_num_threads
    • torch.set_num_threads
    • torch.get_num_interop_threads
    • torch.set_num_interop_threads
    • no_grad
    • enable_grad
    • set_grad_enabled
    • torch.is_grad_enabled
    • inference_mode
    • torch.is_inference_mode_enabled
    • torch.abs
    • torch.absolute
    • torch.acos
    • torch.arccos
    • torch.acosh
    • torch.arccosh
    • torch.add
    • torch.addcdiv
    • torch.addcmul
    • torch.angle
    • torch.asin
    • torch.arcsin
    • torch.asinh
    • torch.arcsinh
    • torch.atan
    • torch.arctan
    • torch.atanh
    • torch.arctanh
    • torch.atan2
    • torch.arctan2
    • torch.bitwise_not
    • torch.bitwise_and
    • torch.bitwise_or
    • torch.bitwise_xor
    • torch.bitwise_left_shift
    • torch.bitwise_right_shift
    • torch.ceil
    • torch.clamp
    • torch.clip
    • torch.conj_physical
    • torch.copysign
    • torch.cos
    • torch.cosh
    • torch.deg2rad
    • torch.div
    • torch.divide
    • torch.digamma
    • torch.erf
    • torch.erfc
    • torch.erfinv
    • torch.exp
    • torch.exp2
    • torch.expm1
    • torch.fake_quantize_per_channel_affine
    • torch.fake_quantize_per_tensor_affine
    • torch.fix
    • torch.float_power
    • torch.floor
    • torch.floor_divide
    • torch.fmod
    • torch.frac
    • torch.frexp
    • torch.gradient
    • torch.imag
    • torch.ldexp
    • torch.lerp
    • torch.lgamma
    • torch.log
    • torch.log10
    • torch.log1p
    • torch.log2
    • torch.logaddexp
    • torch.logaddexp2
    • torch.logical_and
    • torch.logical_not
    • torch.logical_or
    • torch.logical_xor
    • torch.logit
    • torch.hypot
    • torch.i0
    • torch.igamma
    • torch.igammac
    • torch.mul
    • torch.multiply
    • torch.mvlgamma
    • torch.nan_to_num
    • torch.neg
    • torch.negative
    • torch.nextafter
    • torch.polygamma
    • torch.positive
    • torch.pow
    • torch.quantized_batch_norm
    • torch.quantized_max_pool1d
    • torch.quantized_max_pool2d
    • torch.rad2deg
    • torch.real
    • torch.reciprocal
    • torch.remainder
    • torch.round
    • torch.rsqrt
    • torch.sigmoid
    • torch.sign
    • torch.sgn
    • torch.signbit
    • torch.sin
    • torch.sinc
    • torch.sinh
    • torch.softmax
    • torch.sqrt
    • torch.square
    • torch.sub
    • torch.subtract
    • torch.tan
    • torch.tanh
    • torch.true_divide
    • torch.trunc
    • torch.xlogy
    • torch.argmax
    • torch.argmin
    • torch.amax
    • torch.amin
    • torch.aminmax
    • torch.all
    • torch.any
    • torch.max
    • torch.min
    • torch.dist
    • torch.logsumexp
    • torch.mean
    • torch.nanmean
    • torch.median
    • torch.nanmedian
    • torch.mode
    • torch.norm
    • torch.nansum
    • torch.prod
    • torch.quantile
    • torch.nanquantile
    • torch.std
    • torch.std_mean
    • torch.sum
    • torch.unique
    • torch.unique_consecutive
    • torch.var
    • torch.var_mean
    • torch.count_nonzero
    • torch.hash_tensor
    • torch.allclose
    • torch.argsort
    • torch.eq
    • torch.equal
    • torch.ge
    • torch.greater_equal
    • torch.gt
    • torch.greater
    • torch.isclose
    • torch.isfinite
    • torch.isin
    • torch.isinf
    • torch.isposinf
    • torch.isneginf
    • torch.isnan
    • torch.isreal
    • torch.kthvalue
    • torch.le
    • torch.less_equal
    • torch.lt
    • torch.less
    • torch.maximum
    • torch.minimum
    • torch.fmax
    • torch.fmin
    • torch.ne
    • torch.not_equal
    • torch.sort