# TensorPlay > TensorPlay is a transparent deep learning framework for learning, research, and hardware experiments. TensorPlay keeps tensor operations, automatic differentiation, dispatch, and kernel execution readable and recomposable. ## Canonical resources - Website: https://www.tensorplay.cn/ - Documentation: https://www.tensorplay.cn/docs/ - GitHub: https://github.com/lexing-2026/TensorPlay - Community: https://discord.gg/u6T5e2kGJm ## Documentation index - [TensorPlay documentation](https://www.tensorplay.cn/docs/): TensorPlay is a PyTorch-compatible tensor library for deep learning using GPUs and CPUs. - [Automatic Mixed Precision package - tensorplay.amp](https://www.tensorplay.cn/docs/amp.html): tensorplay.amp.autocast_mode.is_autocast_available - [tensorplay.audio](https://www.tensorplay.cn/docs/audio.html): tensorplay.audio is the audio I/O and processing toolkit of TensorPlay, mirroring the torchaudio package layout. The listing below is a static overview; backend availability depends on installed optional dependencies, so - [Automatic differentiation package - tensorplay.autograd](https://www.tensorplay.cn/docs/autograd.html): tensorplay._C._autograd.backward - [tensorplay.utils.checkpoint](https://www.tensorplay.cn/docs/checkpoint.html): tensorplay.utils.checkpoint.checkpoint - [tensorplay.compiler](https://www.tensorplay.cn/docs/compiler.html): TensorPlay ships an in-process graph compiler used by tensorplay.stax and the CUDA graphs workflow. This module is TensorPlay-specific and has no direct upstream torch counterpart (it is conceptually closest to torch.com - [tensorplay.cuda](https://www.tensorplay.cn/docs/cuda.html): tensorplay.cuda.StreamContext - [tensorplay.utils.data](https://www.tensorplay.cn/docs/data.html): tensorplay.utils.data.DataLoader - [Distributed communication package - tensorplay.distributed](https://www.tensorplay.cn/docs/distributed.html): tensorplay.distributed.rendezvous.register_rendezvous_handler - [tensorplay.fft](https://www.tensorplay.cn/docs/fft.html): tensorplay.fft.fft - [tensorplay.futures](https://www.tensorplay.cn/docs/futures.html): tensorplay.futures.Future - [tensorplay._C._autograd.backward](https://www.tensorplay.cn/docs/generated/tensorplay._C._autograd.backward.html): - [tensorplay._composite_funcs.absolute](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.absolute.html): Alias of abs() . - [tensorplay._composite_funcs.acos_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.acos_.html): - [tensorplay._composite_funcs.acosh_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.acosh_.html): - [tensorplay._composite_funcs.adaptive_avg_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.adaptive_avg_pool1d.html): - [tensorplay._composite_funcs.adaptive_max_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.adaptive_max_pool1d.html): - [tensorplay._composite_funcs.adjoint](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.adjoint.html): - [tensorplay._composite_funcs.alias_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.alias_copy.html): - [tensorplay._composite_funcs.arccos](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arccos.html): - [tensorplay._composite_funcs.arccosh](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arccosh.html): - [tensorplay._composite_funcs.arcsin](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arcsin.html): - [tensorplay._composite_funcs.arcsinh](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arcsinh.html): - [tensorplay._composite_funcs.arctan](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arctan.html): - [tensorplay._composite_funcs.arctan2](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arctan2.html): atan2(y, x) = 2*atan(y / (hypot + x)); native atan2 CPU kernel is currently unregistered in this tree, so compose. Edge narrows vs torch: negative-zero y with x < 0 returns +pi instead of -pi. - [tensorplay._composite_funcs.arctanh](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.arctanh.html): - [tensorplay._composite_funcs.asin_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.asin_.html): - [tensorplay._composite_funcs.asinh_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.asinh_.html): - [tensorplay._composite_funcs.atan_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.atan_.html): - [tensorplay._composite_funcs.atanh_](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.atanh_.html): - [tensorplay._composite_funcs.avg_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.avg_pool1d.html): - [tensorplay._composite_funcs.can_cast](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.can_cast.html): - [tensorplay._composite_funcs.cartesian_prod](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.cartesian_prod.html): - [tensorplay._composite_funcs.chain_matmul](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.chain_matmul.html): - [tensorplay._composite_funcs.combinations](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.combinations.html): - [tensorplay._composite_funcs.concat](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.concat.html): - [tensorplay._composite_funcs.concatenate](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.concatenate.html): - [tensorplay._composite_funcs.copysign](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.copysign.html): - [tensorplay._composite_funcs.corrcoef](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.corrcoef.html): - [tensorplay._composite_funcs.cosine_similarity](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.cosine_similarity.html): - [tensorplay._composite_funcs.cov](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.cov.html): Each row of input is a variable, each column an observation (torch semantics; no rowvar argument). - [tensorplay._composite_funcs.cumulative_trapezoid](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.cumulative_trapezoid.html): - [tensorplay._composite_funcs.detach](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.detach.html): - [tensorplay._composite_funcs.diagflat](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.diagflat.html): - [tensorplay._composite_funcs.diagonal_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.diagonal_copy.html): - [tensorplay._composite_funcs.divide](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.divide.html): - [tensorplay._composite_funcs.expand_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.expand_copy.html): - [tensorplay._composite_funcs.floor_divide](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.floor_divide.html): - [tensorplay._composite_funcs.fmod](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.fmod.html): - [tensorplay._composite_funcs.ger](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.ger.html): - [tensorplay._composite_funcs.get_device](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.get_device.html): - [tensorplay._composite_funcs.gradient](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.gradient.html): - [tensorplay._composite_funcs.histc](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.histc.html): - [tensorplay._composite_funcs.histogram](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.histogram.html): - [tensorplay._composite_funcs.is_conj](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.is_conj.html): - [tensorplay._composite_funcs.is_neg](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.is_neg.html): - [tensorplay._composite_funcs.is_nonzero](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.is_nonzero.html): - [tensorplay._composite_funcs.is_same_size](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.is_same_size.html): - [tensorplay._composite_funcs.isin](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.isin.html): - [tensorplay._composite_funcs.kaiser_window](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.kaiser_window.html): - [tensorplay._composite_funcs.kron](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.kron.html): - [tensorplay._composite_funcs.lstm_cell](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.lstm_cell.html): - [tensorplay._composite_funcs.matrix_power](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.matrix_power.html): - [tensorplay._composite_funcs.max_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.max_pool1d.html): - [tensorplay._composite_funcs.multiply](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.multiply.html): - [tensorplay._composite_funcs.nanquantile](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.nanquantile.html): - [tensorplay._composite_funcs.narrow_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.narrow_copy.html): - [tensorplay._composite_funcs.numel](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.numel.html): - [tensorplay._composite_funcs.permute_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.permute_copy.html): - [tensorplay._composite_funcs.promote_types](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.promote_types.html): - [tensorplay._composite_funcs.put](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.put.html): - [tensorplay._composite_funcs.quantile](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.quantile.html): - [tensorplay._composite_funcs.remainder](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.remainder.html): - [tensorplay._composite_funcs.repeat_interleave](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.repeat_interleave.html): - [tensorplay._composite_funcs.resolve_conj](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.resolve_conj.html): - [tensorplay._composite_funcs.resolve_neg](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.resolve_neg.html): - [tensorplay._composite_funcs.result_type](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.result_type.html): - [tensorplay._composite_funcs.rms_norm](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.rms_norm.html): - [tensorplay._composite_funcs.rnn_relu_cell](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.rnn_relu_cell.html): - [tensorplay._composite_funcs.rnn_tanh_cell](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.rnn_tanh_cell.html): - [tensorplay._composite_funcs.rsub](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.rsub.html): - [tensorplay._composite_funcs.scalar_tensor](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.scalar_tensor.html): - [tensorplay._composite_funcs.select_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.select_copy.html): - [tensorplay._composite_funcs.slice_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.slice_copy.html): - [tensorplay._composite_funcs.split_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.split_copy.html): - [tensorplay._composite_funcs.squeeze_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.squeeze_copy.html): - [tensorplay._composite_funcs.subtract](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.subtract.html): - [tensorplay._composite_funcs.t_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.t_copy.html): - [tensorplay._composite_funcs.transpose_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.transpose_copy.html): - [tensorplay._composite_funcs.trapezoid](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.trapezoid.html): - [tensorplay._composite_funcs.trapz](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.trapz.html): - [tensorplay._composite_funcs.tril_indices](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.tril_indices.html): - [tensorplay._composite_funcs.triu_indices](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.triu_indices.html): - [tensorplay._composite_funcs.true_divide](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.true_divide.html): - [tensorplay._composite_funcs.unbind_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.unbind_copy.html): - [tensorplay._composite_funcs.unfold_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.unfold_copy.html): - [tensorplay._composite_funcs.unique_consecutive](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.unique_consecutive.html): - [tensorplay._composite_funcs.unsqueeze_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.unsqueeze_copy.html): - [tensorplay._composite_funcs.vander](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.vander.html): - [tensorplay._composite_funcs.view_copy](https://www.tensorplay.cn/docs/generated/tensorplay._composite_funcs.view_copy.html): - [tensorplay._shape_funcs.broadcast_shapes](https://www.tensorplay.cn/docs/generated/tensorplay._shape_funcs.broadcast_shapes.html): Returns the broadcast shape of the given shapes (right-aligned). - [tensorplay._shape_funcs.tensordot](https://www.tensorplay.cn/docs/generated/tensorplay._shape_funcs.tensordot.html): Contracts input and other over the given dimensions. - [tensorplay._shape_funcs.unravel_index](https://www.tensorplay.cn/docs/generated/tensorplay._shape_funcs.unravel_index.html): Converts flat indices into coordinate tuples (one LongTensor per dim). - [tensorplay.adaptive_avg_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.adaptive_avg_pool2d.html): - [tensorplay.adaptive_avg_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.adaptive_avg_pool3d.html): - [tensorplay.adaptive_max_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.adaptive_max_pool2d.html): - [tensorplay.add_](https://www.tensorplay.cn/docs/generated/tensorplay.add_.html): - [tensorplay.add_relu](https://www.tensorplay.cn/docs/generated/tensorplay.add_relu.html): - [tensorplay.addcdiv_](https://www.tensorplay.cn/docs/generated/tensorplay.addcdiv_.html): - [tensorplay.addcmul_](https://www.tensorplay.cn/docs/generated/tensorplay.addcmul_.html): - [tensorplay.airy_ai](https://www.tensorplay.cn/docs/generated/tensorplay.airy_ai.html): - [autocast](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.autocast.html): Instances of autocast serve as context managers or decorators that allow regions of your script to run in mixed precision. - [tensorplay.amp.autocast_mode.custom_bwd](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.custom_bwd.html): Create a helper decorator for backward methods of custom autograd functions. - [tensorplay.amp.autocast_mode.custom_fwd](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.custom_fwd.html): Create a helper decorator for forward methods of custom autograd functions. - [tensorplay.amp.autocast_mode.get_autocast_cpu_dtype](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.get_autocast_cpu_dtype.html): Return the dtype to be used for CPU autocasting. - [tensorplay.amp.autocast_mode.get_autocast_gpu_dtype](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.get_autocast_gpu_dtype.html): Return the dtype to be used for CUDA autocasting. - [tensorplay.amp.autocast_mode.is_autocast_available](https://www.tensorplay.cn/docs/generated/tensorplay.amp.autocast_mode.is_autocast_available.html): - [GradScaler](https://www.tensorplay.cn/docs/generated/tensorplay.amp.grad_scaler.GradScaler.html): An instance scaler of GradScaler . - [tensorplay.amp.is_autocast_available](https://www.tensorplay.cn/docs/generated/tensorplay.amp.is_autocast_available.html): - [tensorplay.are_deterministic_algorithms_enabled](https://www.tensorplay.cn/docs/generated/tensorplay.are_deterministic_algorithms_enabled.html): Returns True if the global deterministic flag is turned on. Refer to tensorplay.use_deterministic_algorithms() documentation for more details. - [tensorplay.as_tensor](https://www.tensorplay.cn/docs/generated/tensorplay.as_tensor.html): Convert data into a tensor, sharing storage when possible. - [tensorplay.autocast_decrement_nesting](https://www.tensorplay.cn/docs/generated/tensorplay.autocast_decrement_nesting.html): - [tensorplay.autocast_increment_nesting](https://www.tensorplay.cn/docs/generated/tensorplay.autocast_increment_nesting.html): - [autocast](https://www.tensorplay.cn/docs/generated/tensorplay.autocast.html): Instances of autocast serve as context managers or decorators that allow regions of your script to run in mixed precision. - [detect_anomaly](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.anomaly_mode.detect_anomaly.html): Context-manager that enables anomaly detection for the autograd engine. - [set_detect_anomaly](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.anomaly_mode.set_detect_anomaly.html): Context-manager that sets the anomaly detection for the autograd engine on or off. - [tensorplay.autograd.backward](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.backward.html): - [Function](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.function.Function.html): Records operation history and defines formulas for differentiating ops. - [tensorplay.autograd.function.once_differentiable](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.function.once_differentiable.html): Decorator to make a custom autograd Function’s backward run once, with gradients detached and grad-mode disabled inside. - [tensorplay.autograd.functional.hessian](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.hessian.html): Compute the Hessian of a given scalar function. - [tensorplay.autograd.functional.hvp](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.hvp.html): Compute the dot product between the scalar function’s Hessian and a vector v at a specified point. - [tensorplay.autograd.functional.jacobian](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.jacobian.html): Compute the Jacobian of a given function. - [tensorplay.autograd.functional.jvp](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.jvp.html): Compute the dot product between the Jacobian of the given function at the point given by the inputs and a vector v . - [tensorplay.autograd.functional.vhp](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.vhp.html): Compute the dot product between vector v and Hessian of a given scalar function at a specified point. - [tensorplay.autograd.functional.vjp](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.functional.vjp.html): Compute the dot product between a vector v and the Jacobian of the given function at the point given by the inputs. - [enable_grad](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad_mode.enable_grad.html): Context-manager that enables gradient calculation. - [inference_mode](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad_mode.inference_mode.html): Context manager that enables or disables inference mode. - [tensorplay.autograd.grad_mode.is_grad_enabled](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad_mode.is_grad_enabled.html): - [no_grad](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad_mode.no_grad.html): Context-manager that disables gradient calculation. - [set_grad_enabled](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad_mode.set_grad_enabled.html): Context-manager that sets gradient calculation on or off. - [tensorplay.autograd.grad](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.grad.html): Compute and return the sum of gradients of outputs with respect to the inputs. - [tensorplay.autograd.gradcheck.get_analytical_jacobian](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.get_analytical_jacobian.html): - [tensorplay.autograd.gradcheck.get_numerical_jacobian_wrt_specific_input](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.get_numerical_jacobian_wrt_specific_input.html): - [tensorplay.autograd.gradcheck.get_numerical_jacobian](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.get_numerical_jacobian.html): Compute the numerical Jacobian for a given fn and its inputs. - [tensorplay.autograd.gradcheck.gradcheck](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.gradcheck.html): Check gradients computed via small finite differences against analytical gradients wrt tensors in inputs that are of floating point or complex type and with requires_grad=True . - [tensorplay.autograd.gradcheck.GradcheckError](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.GradcheckError.html): Error raised by gradcheck() and gradgradcheck() . - [tensorplay.autograd.gradcheck.gradgradcheck](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.gradcheck.gradgradcheck.html): Check gradients of gradients computed via small finite differences against analytical gradients wrt tensors in inputs and grad_outputs that are of floating point or complex type and with requires_grad=True . - [tensorplay.autograd.jvp](https://www.tensorplay.cn/docs/generated/tensorplay.autograd.jvp.html): Compute the dot product between the Jacobian of the given function at the point given by the inputs and a vector v . - [tensorplay.avg_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.avg_pool2d.html): - [tensorplay.avg_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.avg_pool3d.html): - [tensorplay.batch_norm](https://www.tensorplay.cn/docs/generated/tensorplay.batch_norm.html): - [tensorplay.bernoulli_](https://www.tensorplay.cn/docs/generated/tensorplay.bernoulli_.html): - [tensorplay.bessel_j0](https://www.tensorplay.cn/docs/generated/tensorplay.bessel_j0.html): - [tensorplay.bessel_j1](https://www.tensorplay.cn/docs/generated/tensorplay.bessel_j1.html): - [tensorplay.bessel_y0](https://www.tensorplay.cn/docs/generated/tensorplay.bessel_y0.html): - [tensorplay.bessel_y1](https://www.tensorplay.cn/docs/generated/tensorplay.bessel_y1.html): - [tensorplay.binary_cross_entropy_with_logits](https://www.tensorplay.cn/docs/generated/tensorplay.binary_cross_entropy_with_logits.html): - [tensorplay.binary_cross_entropy](https://www.tensorplay.cn/docs/generated/tensorplay.binary_cross_entropy.html): - [tensorplay.cauchy_](https://www.tensorplay.cn/docs/generated/tensorplay.cauchy_.html): - [tensorplay.celu](https://www.tensorplay.cn/docs/generated/tensorplay.celu.html): - [tensorplay.chebyshev_polynomial_t](https://www.tensorplay.cn/docs/generated/tensorplay.chebyshev_polynomial_t.html): - [tensorplay.chebyshev_polynomial_u](https://www.tensorplay.cn/docs/generated/tensorplay.chebyshev_polynomial_u.html): - [tensorplay.chebyshev_polynomial_v](https://www.tensorplay.cn/docs/generated/tensorplay.chebyshev_polynomial_v.html): - [tensorplay.chebyshev_polynomial_w](https://www.tensorplay.cn/docs/generated/tensorplay.chebyshev_polynomial_w.html): - [tensorplay.cholesky](https://www.tensorplay.cn/docs/generated/tensorplay.cholesky.html): - [tensorplay.circular_pad_nd](https://www.tensorplay.cn/docs/generated/tensorplay.circular_pad_nd.html): - [tensorplay.clamp_max](https://www.tensorplay.cn/docs/generated/tensorplay.clamp_max.html): - [tensorplay.clamp_min](https://www.tensorplay.cn/docs/generated/tensorplay.clamp_min.html): - [tensorplay.clear_autocast_cache](https://www.tensorplay.cn/docs/generated/tensorplay.clear_autocast_cache.html): - [tensorplay.col2im](https://www.tensorplay.cn/docs/generated/tensorplay.col2im.html): - [tensorplay.compiler.api.compile](https://www.tensorplay.cn/docs/generated/tensorplay.compiler.api.compile.html): Compile a callable through the TensorPlay compiler frontend. - [tensorplay.constant_pad_nd](https://www.tensorplay.cn/docs/generated/tensorplay.constant_pad_nd.html): - [tensorplay.contiguous](https://www.tensorplay.cn/docs/generated/tensorplay.contiguous.html): - [tensorplay.conv_transpose1d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose1d_grad_bias.html): - [tensorplay.conv_transpose1d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose1d_grad_input.html): - [tensorplay.conv_transpose1d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose1d_grad_weight.html): - [tensorplay.conv_transpose2d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose2d_grad_bias.html): - [tensorplay.conv_transpose2d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose2d_grad_input.html): - [tensorplay.conv_transpose2d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose2d_grad_weight.html): - [tensorplay.conv_transpose3d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose3d_grad_bias.html): - [tensorplay.conv_transpose3d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose3d_grad_input.html): - [tensorplay.conv_transpose3d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv_transpose3d_grad_weight.html): - [tensorplay.conv1d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv1d_grad_bias.html): - [tensorplay.conv1d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv1d_grad_input.html): - [tensorplay.conv1d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv1d_grad_weight.html): - [tensorplay.conv2d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv2d_grad_bias.html): - [tensorplay.conv2d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv2d_grad_input.html): - [tensorplay.conv2d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv2d_grad_weight.html): - [tensorplay.conv2d_relu](https://www.tensorplay.cn/docs/generated/tensorplay.conv2d_relu.html): - [tensorplay.conv2d](https://www.tensorplay.cn/docs/generated/tensorplay.conv2d.html): - [tensorplay.conv3d_grad_bias](https://www.tensorplay.cn/docs/generated/tensorplay.conv3d_grad_bias.html): - [tensorplay.conv3d_grad_input](https://www.tensorplay.cn/docs/generated/tensorplay.conv3d_grad_input.html): - [tensorplay.conv3d_grad_weight](https://www.tensorplay.cn/docs/generated/tensorplay.conv3d_grad_weight.html): - [tensorplay.copy_](https://www.tensorplay.cn/docs/generated/tensorplay.copy_.html): - [tensorplay.cuda.AcceleratorError](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.AcceleratorError.html): - [tensorplay.cuda.caching_allocator_alloc](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.caching_allocator_alloc.html): Perform a memory allocation using the CUDA memory allocator. - [tensorplay.cuda.caching_allocator_delete](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.caching_allocator_delete.html): Delete memory allocated using the CUDA memory allocator. - [tensorplay.cuda.can_device_access_peer](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.can_device_access_peer.html): Check if peer access between two devices is possible. - [tensorplay.cuda.change_current_allocator](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.change_current_allocator.html): Change the currently used memory allocator (not supported by this build). - [tensorplay.cuda.check_error](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.check_error.html): Raise an error if the result of a CUDA runtime API call is not success. - [tensorplay.cuda.classproperty](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.classproperty.html): - [tensorplay.cuda.clock_rate](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.clock_rate.html): Return the clock speed of the GPU SM in MHz (megahertz) over the past sample period as given by nvidia-smi . - [tensorplay.cuda.CudaError](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.CudaError.html): - [CUDAPluggableAllocator](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.CUDAPluggableAllocator.html): CUDA memory allocator plugin (not supported by this TensorPlay build). - [tensorplay.cuda.cudart](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.cudart.html): Retrieves the CUDA runtime API module. - [tensorplay.cuda.current_blas_handle](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.current_blas_handle.html): Return cublasHandle_t pointer to current cuBLAS handle - [tensorplay.cuda.current_device](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.current_device.html): Return the index of a currently selected device. - [tensorplay.cuda.current_solver_handle](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.current_solver_handle.html): Return cusolverDnHandle_t pointer to current cuSOLVER handle - [tensorplay.cuda.current_stream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.current_stream.html): Return the currently selected Stream for a given device. - [tensorplay.cuda.default_stream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.default_stream.html): Return the default Stream for a given device. - [tensorplay.cuda.DeferredCudaCallError](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.DeferredCudaCallError.html): - [tensorplay.cuda.device_count](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.device_count.html): Return the number of GPUs available. - [tensorplay.cuda.device_memory_used](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.device_memory_used.html): Return used global (device) memory in bytes as given by nvidia-smi . - [device_of](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.device_of.html): Context-manager that changes the current device to that of given object. - [device](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.device.html): Context-manager that changes the selected device. - [Device](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.Device.html): - [tensorplay.cuda.empty_cache](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.empty_cache.html): Release all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi . - [GdsFile](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.gds.GdsFile.html): A GDS file handle (not supported by this TensorPlay build). - [tensorplay.cuda.get_allocator_backend](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_allocator_backend.html): Returns the active allocator backend as a string. Always native here. - [tensorplay.cuda.get_arch_list](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_arch_list.html): Return list CUDA architectures this library was compiled for. - [tensorplay.cuda.get_device_capability](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_device_capability.html): Get the cuda capability of a device. - [tensorplay.cuda.get_device_name](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_device_name.html): Get the name of a device. - [tensorplay.cuda.get_device_properties](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_device_properties.html): Get the properties of a device. - [tensorplay.cuda.get_gencode_flags](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_gencode_flags.html): Return NVCC gencode flags this library was compiled with. - [tensorplay.cuda.get_per_process_memory_fraction](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_per_process_memory_fraction.html): Get memory fraction for a process. Always returns 1.0 in this build. - [tensorplay.cuda.get_stream_from_external](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_stream_from_external.html): Return a Stream from an externally allocated CUDA stream. - [tensorplay.cuda.get_sync_debug_mode](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.get_sync_debug_mode.html): Return current value of debug mode for cuda synchronizing operations. - [tensorplay.cuda.graph_annotations.clear_kernel_annotations](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graph_annotations.clear_kernel_annotations.html): Clear all recorded kernel annotations. - [tensorplay.cuda.graph_annotations.get_kernel_annotations](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graph_annotations.get_kernel_annotations.html): Return the recorded kernel annotations mapping. - [tensorplay.cuda.graph_annotations.is_available](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graph_annotations.is_available.html): Whether graph-kernel annotation recording is supported (always False here). - [tensorplay.cuda.graph_annotations.mark_kernels](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graph_annotations.mark_kernels.html): Tag the GPU work captured within its scope with user metadata. - [CUDAGraph](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.CUDAGraph.html): Wrapper around a CUDA graph, mirroring torch.cuda.CUDAGraph . - [tensorplay.cuda.graphs.export_dot](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.export_dot.html): Export the last captured CUDA graph to a DOT file. - [tensorplay.cuda.graphs.export_graph_data](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.export_graph_data.html): Serialize a captured CUDA graph into a dictionary of node data. - [tensorplay.cuda.graphs.graph_pool_handle](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.graph_pool_handle.html): Return an opaque token representing the id of a graph memory pool. - [tensorplay.cuda.graphs.graph](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.graph.html): Context-manager that captures CUDA work into a tensorplay.cuda.CUDAGraph . - [tensorplay.cuda.graphs.is_current_stream_capturing](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.is_current_stream_capturing.html): Return True if CUDA graph capture is underway on the current thread. - [tensorplay.cuda.graphs.make_graphed_callables](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.graphs.make_graphed_callables.html): Callables that run per-iteration with CUDA graph capture (not supported). - [GreenContext](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.green_contexts.GreenContext.html): - [tensorplay.cuda.host_memory_stats_as_nested_dict](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.host_memory_stats_as_nested_dict.html): Return the result of host_memory_stats() as a nested dictionary. - [tensorplay.cuda.host_memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.host_memory_stats.html): Return a dictionary of pinned (host) allocator statistics. - [tensorplay.cuda.init](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.init.html): Initialize TensorPlay’s CUDA state. - [tensorplay.cuda.ipc_collect](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.ipc_collect.html): Force collects GPU memory after it has been released by CUDA IPC. - [tensorplay.cuda.is_available](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.is_available.html): Return a bool indicating if CUDA is currently available. - [tensorplay.cuda.is_bf16_supported](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.is_bf16_supported.html): Return a bool indicating if the current CUDA device supports dtype bfloat16. - [tensorplay.cuda.is_gds_available](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.is_gds_available.html): Return whether GDS is available. Always False in this build. - [tensorplay.cuda.is_initialized](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.is_initialized.html): Return whether TensorPlay’s CUDA state has been initialized. - [tensorplay.cuda.is_tf32_supported](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.is_tf32_supported.html): Return a bool indicating if the current CUDA device supports dtype tf32. - [tensorplay.cuda.list_gpu_processes](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.list_gpu_processes.html): Return a human-readable printout of the running processes and their GPU memory use for a given device. - [tensorplay.cuda.max_memory_allocated](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.max_memory_allocated.html): Return the maximum GPU memory occupied by tensors in bytes for a given device. - [tensorplay.cuda.max_memory_cached](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.max_memory_cached.html): Deprecated; see max_memory_reserved() . - [tensorplay.cuda.max_memory_reserved](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.max_memory_reserved.html): Return the maximum GPU memory managed by the caching allocator in bytes for a given device. - [tensorplay.cuda.mem_get_info](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.mem_get_info.html): Return the global free and total GPU memory for a given device using cudaMemGetInfo. - [tensorplay.cuda.memory_allocated](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_allocated.html): Return the current GPU memory occupied by tensors in bytes for a given device. - [tensorplay.cuda.memory_cached](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_cached.html): Deprecated; see memory_reserved() . - [tensorplay.cuda.memory_reserved](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_reserved.html): Return the current GPU memory managed by the caching allocator in bytes for a given device. - [tensorplay.cuda.memory_snapshot](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_snapshot.html): Return a snapshot of the CUDA memory allocator state across all devices. - [tensorplay.cuda.memory_stats_as_nested_dict](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_stats_as_nested_dict.html): Return the result of memory_stats() as a nested dictionary. - [tensorplay.cuda.memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_stats.html): Return a dictionary of CUDA memory allocator statistics for a given device. - [tensorplay.cuda.memory_summary](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_summary.html): Return a human-readable printout of the current memory allocator statistics for a given device. - [tensorplay.cuda.memory_usage](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory_usage.html): Return the percent of time over the past sample period during which global (device) memory was being read or written as given by nvidia-smi . - [tensorplay.cuda.memory.caching_allocator_disabled](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory.caching_allocator_disabled.html): Context manager that temporarily disables the CUDA caching allocator. - [tensorplay.cuda.memory.caching_allocator_enable](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory.caching_allocator_enable.html): Enable or disable the CUDA memory allocator. On by default. - [tensorplay.cuda.memory.use_mem_pool](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.memory.use_mem_pool.html): Route allocations to a MemPool (not supported by this build). - [MemPool](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.MemPool.html): MemPool context (not supported by this TensorPlay build). - [tensorplay.cuda.nccl.is_available](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nccl.is_available.html): - [tensorplay.cuda.nccl.version](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nccl.version.html): Returns the version of the NCCL. - [tensorplay.cuda.nvtx.mark](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.mark.html): Describe an instantaneous event that occurred at some point. - [tensorplay.cuda.nvtx.range_end](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.range_end.html): Mark the end of a range for a given range_id. - [tensorplay.cuda.nvtx.range_pop](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.range_pop.html): Pop a range off of a stack of nested range spans. Returns the zero-based depth of the range that is ended. - [tensorplay.cuda.nvtx.range_push](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.range_push.html): Push a range onto a stack of nested range span. Returns zero-based depth of the range that is started. - [tensorplay.cuda.nvtx.range_start](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.range_start.html): Mark the start of a range with string message. It returns a unique handle for this range to pass to the corresponding call to rangeEnd(). - [tensorplay.cuda.nvtx.range](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.nvtx.range.html): Context manager / decorator that pushes an NVTX range at the beginning of its scope, and pops it at the end. If extra arguments are given, they are passed as arguments to msg.format(). - [tensorplay.cuda.OutOfMemoryError](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.OutOfMemoryError.html): - [tensorplay.cuda.power_draw](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.power_draw.html): Return the average power draw of the GPU sensor in mW (MilliWatts) over the past sample period as given by nvidia-smi for Fermi or newer fully supported devices. - [tensorplay.cuda.profiler.profile](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.profiler.profile.html): Enable profiling. - [tensorplay.cuda.profiler.start](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.profiler.start.html): Starts cuda profiler data collection. - [tensorplay.cuda.profiler.stop](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.profiler.stop.html): Stops cuda profiler data collection. - [tensorplay.cuda.random.get_rng_state_all](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.get_rng_state_all.html): Return a list of ByteTensor representing the random number states of all devices. - [tensorplay.cuda.random.get_rng_state](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.get_rng_state.html): Return the random number generator state of the specified GPU as a ByteTensor. - [tensorplay.cuda.random.initial_seed](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.initial_seed.html): Return the current random seed of the current GPU. - [tensorplay.cuda.random.manual_seed_all](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.manual_seed_all.html): Set the seed for generating random numbers on all GPUs. - [tensorplay.cuda.random.manual_seed](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.manual_seed.html): Set the seed for generating random numbers for the current GPU. - [tensorplay.cuda.random.seed_all](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.seed_all.html): Set the seed for generating random numbers to a random number on all GPUs. - [tensorplay.cuda.random.seed](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.seed.html): Set the seed for generating random numbers to a random number for the current GPU. - [tensorplay.cuda.random.set_rng_state_all](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.set_rng_state_all.html): Set the random number generator state of all devices. - [tensorplay.cuda.random.set_rng_state](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.set_rng_state.html): Set the random number generator state of the specified GPU. - [tensorplay.cuda.reset_accumulated_host_memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_accumulated_host_memory_stats.html): Reset the “accumulated” (historical) stats tracked by the host memory allocator. - [tensorplay.cuda.reset_accumulated_memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_accumulated_memory_stats.html): Reset the “accumulated” (historical) stats tracked by the CUDA memory allocator. - [tensorplay.cuda.reset_max_memory_allocated](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_max_memory_allocated.html): Reset the starting point in tracking maximum GPU memory occupied by tensors for a given device. - [tensorplay.cuda.reset_max_memory_cached](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_max_memory_cached.html): Reset the starting point in tracking maximum GPU memory managed by the caching allocator for a given device. - [tensorplay.cuda.reset_peak_host_memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_peak_host_memory_stats.html): Reset the “peak” stats tracked by the host memory allocator. - [tensorplay.cuda.reset_peak_memory_stats](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.reset_peak_memory_stats.html): Reset the “peak” stats tracked by the CUDA memory allocator. - [tensorplay.cuda.set_device](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.set_device.html): Set the current device. - [tensorplay.cuda.set_per_process_memory_fraction](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.set_per_process_memory_fraction.html): Set memory fraction for a process. - [tensorplay.cuda.set_stream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.set_stream.html): Usage of this function is discouraged in favor of the stream context manager. - [tensorplay.cuda.set_sync_debug_mode](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.set_sync_debug_mode.html): Set the debug mode for cuda synchronizing operations. - [tensorplay.cuda.stream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.stream.html): Wrap around the Context-manager StreamContext that selects a given stream. - [StreamContext](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.StreamContext.html): Context-manager that selects a given stream. - [Event](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.streams.Event.html): Wrapper around a CUDA event. - [ExternalStream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.streams.ExternalStream.html): Wrapper around an externally allocated CUDA stream. - [Stream](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.streams.Stream.html): Wrapper around a CUDA stream. - [tensorplay.cuda.synchronize](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.synchronize.html): Wait for all kernels in all streams on a CUDA device to complete. - [tensorplay.cuda.temperature](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.temperature.html): Return the average temperature of the GPU sensor in Degrees C (Centigrades). - [tensorplay.cuda.utilization](https://www.tensorplay.cn/docs/generated/tensorplay.cuda.utilization.html): Return the percent of time over the past sample period during which one or more kernels was executing on the GPU as given by nvidia-smi . - [tensorplay.custom_bwd](https://www.tensorplay.cn/docs/generated/tensorplay.custom_bwd.html): Create a helper decorator for backward methods of custom autograd functions. - [tensorplay.custom_fwd](https://www.tensorplay.cn/docs/generated/tensorplay.custom_fwd.html): Create a helper decorator for forward methods of custom autograd functions. - [tensorplay.default_generator](https://www.tensorplay.cn/docs/generated/tensorplay.default_generator.html): - [tensorplay.dequantize_per_channel](https://www.tensorplay.cn/docs/generated/tensorplay.dequantize_per_channel.html): - [tensorplay.dequantize_per_tensor](https://www.tensorplay.cn/docs/generated/tensorplay.dequantize_per_tensor.html): - [device](https://www.tensorplay.cn/docs/generated/tensorplay.device.html): alias of Device - [Device](https://www.tensorplay.cn/docs/generated/tensorplay.Device.html): - [DeviceType](https://www.tensorplay.cn/docs/generated/tensorplay.DeviceType.html): Members: - [tensorplay.diagonal](https://www.tensorplay.cn/docs/generated/tensorplay.diagonal.html): - [FileStore](https://www.tensorplay.cn/docs/generated/tensorplay.distributed._store.FileStore.html): Flock-based append-log store in a single file. - [Store](https://www.tensorplay.cn/docs/generated/tensorplay.distributed._store.Store.html): - [TCPStore](https://www.tensorplay.cn/docs/generated/tensorplay.distributed._store.TCPStore.html): Client for a threaded TCP key-value server ( torch.distributed.TCPStore subset: set/get/add/delete/check as used by rendezvous and barriers). - [tensorplay.distributed.algorithms.model_averaging.utils.average_parameters_or_parameter_groups](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.algorithms.model_averaging.utils.average_parameters_or_parameter_groups.html): Averages parameters of a model or parameter groups of an optimizer. - [tensorplay.distributed.algorithms.model_averaging.utils.average_parameters](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.algorithms.model_averaging.utils.average_parameters.html): Averages all the given parameters. - [tensorplay.distributed.algorithms.model_averaging.utils.get_params_to_average](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.algorithms.model_averaging.utils.get_params_to_average.html): Return a list of parameters that need to average. - [tensorplay.distributed.collective_utils.all_gather_object_enforce_type](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.collective_utils.all_gather_object_enforce_type.html): Similar to plain all_gather_object but with additional type checking AFTER gather is done to ensure basic consistency. If check does not pass, all ranks will fail with exception. - [DeviceMesh](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.device_mesh.DeviceMesh.html): DeviceMesh represents a mesh of devices (torch parity). - [tensorplay.distributed.device_mesh.init_device_mesh](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.device_mesh.init_device_mesh.html): Initializes a DeviceMesh based on device_type and mesh_shape (torch parity). - [tensorplay.distributed.distributed_c10d.all_gather_object](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.all_gather_object.html): Gathers picklable objects from the whole group into a list (torch parity). - [tensorplay.distributed.distributed_c10d.all_gather](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.all_gather.html): - [tensorplay.distributed.distributed_c10d.all_reduce](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.all_reduce.html): - [tensorplay.distributed.distributed_c10d.all_to_all_single](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.all_to_all_single.html): Splits input evenly (or by split sizes) and scatters the chunks. - [tensorplay.distributed.distributed_c10d.all_to_all](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.all_to_all.html): Scatters a list of tensors to ranks and collects one from each. - [Backend](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.Backend.html): - [tensorplay.distributed.distributed_c10d.barrier](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.barrier.html): - [tensorplay.distributed.distributed_c10d.batch_isend_irecv](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.batch_isend_irecv.html): Send or receive a batch of tensors asynchronously (torch parity). - [tensorplay.distributed.distributed_c10d.broadcast_object_list](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.broadcast_object_list.html): Broadcasts picklable objects in object_list to the whole group. - [tensorplay.distributed.distributed_c10d.broadcast](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.broadcast.html): - [tensorplay.distributed.distributed_c10d.destroy_process_group](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.destroy_process_group.html): - [tensorplay.distributed.distributed_c10d.gather_object](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.gather_object.html): Gathers picklable objects from the whole group in a single process. - [tensorplay.distributed.distributed_c10d.gather](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.gather.html): - [tensorplay.distributed.distributed_c10d.get_backend](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_backend.html): - [tensorplay.distributed.distributed_c10d.get_global_rank](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_global_rank.html): Translate a group rank into a global rank (torch parity). - [tensorplay.distributed.distributed_c10d.get_group_rank](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_group_rank.html): Translate a global rank into a group rank (torch parity). - [tensorplay.distributed.distributed_c10d.get_process_group_ranks](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_process_group_ranks.html): Get all ranks associated with group (torch parity). - [tensorplay.distributed.distributed_c10d.get_rank](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_rank.html): - [tensorplay.distributed.distributed_c10d.get_world_size](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.get_world_size.html): - [tensorplay.distributed.distributed_c10d.init_process_group](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.init_process_group.html): - [tensorplay.distributed.distributed_c10d.irecv](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.irecv.html): Receives a tensor asynchronously (torch parity; src global rank). - [tensorplay.distributed.distributed_c10d.is_available](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.is_available.html): - [tensorplay.distributed.distributed_c10d.is_gloo_available](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.is_gloo_available.html): - [tensorplay.distributed.distributed_c10d.is_initialized](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.is_initialized.html): - [tensorplay.distributed.distributed_c10d.is_mpi_available](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.is_mpi_available.html): - [tensorplay.distributed.distributed_c10d.is_nccl_available](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.is_nccl_available.html): - [tensorplay.distributed.distributed_c10d.isend](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.isend.html): Send a tensor asynchronously (torch parity; dst is a global rank). - [tensorplay.distributed.distributed_c10d.new_group](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.new_group.html): - [P2POp](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.P2POp.html): A class to build point-to-point operations for batch_isend_irecv . - [tensorplay.distributed.distributed_c10d.recv_object_list](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.recv_object_list.html): Receives picklable objects in object_list synchronously (torch parity). - [tensorplay.distributed.distributed_c10d.recv](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.recv.html): Receives a tensor synchronously; returns the sender rank. - [tensorplay.distributed.distributed_c10d.reduce_scatter](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.reduce_scatter.html): - [tensorplay.distributed.distributed_c10d.reduce](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.reduce.html): - [ReduceOp](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.ReduceOp.html): - [tensorplay.distributed.distributed_c10d.scatter_object_list](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.scatter_object_list.html): Scatters picklable objects to the whole group (torch parity). - [tensorplay.distributed.distributed_c10d.scatter](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.scatter.html): - [tensorplay.distributed.distributed_c10d.send_object_list](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.send_object_list.html): Sends picklable objects in object_list synchronously (torch parity). - [tensorplay.distributed.distributed_c10d.send](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.send.html): Send a tensor synchronously (torch parity). - [Work](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.distributed_c10d.Work.html): Handle for an async collective (torch.distributed.Work subset). - [tensorplay.distributed.launch.launch](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.launch.launch.html): - [tensorplay.distributed.launch.main](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.launch.main.html): - [tensorplay.distributed.launch.parse_args](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.launch.parse_args.html): - [tensorplay.distributed.rendezvous.register_rendezvous_handler](https://www.tensorplay.cn/docs/generated/tensorplay.distributed.rendezvous.register_rendezvous_handler.html): Register a new rendezvous handler. - [tensorplay.div_](https://www.tensorplay.cn/docs/generated/tensorplay.div_.html): - [dtype](https://www.tensorplay.cn/docs/generated/tensorplay.dtype.html): alias of DType - [DType](https://www.tensorplay.cn/docs/generated/tensorplay.DType.html): Members: - [tensorplay.elu](https://www.tensorplay.cn/docs/generated/tensorplay.elu.html): - [tensorplay.expand_as](https://www.tensorplay.cn/docs/generated/tensorplay.expand_as.html): - [tensorplay.expand](https://www.tensorplay.cn/docs/generated/tensorplay.expand.html): - [tensorplay.exponential_](https://www.tensorplay.cn/docs/generated/tensorplay.exponential_.html): - [tensorplay.fft_fft](https://www.tensorplay.cn/docs/generated/tensorplay.fft_fft.html): - [tensorplay.fft_ifft](https://www.tensorplay.cn/docs/generated/tensorplay.fft_ifft.html): - [tensorplay.fft_irfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft_irfft.html): - [tensorplay.fft_rfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft_rfft.html): - [tensorplay.fft.fft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.fft.html): Computes the one-dimensional discrete Fourier transform. - [tensorplay.fft.fft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.fft2.html): Computes the two-dimensional discrete Fourier transform. - [tensorplay.fft.fftfreq](https://www.tensorplay.cn/docs/generated/tensorplay.fft.fftfreq.html): DFT sample frequencies (cycles/unit): [0, 1, ..., n/2-1, -n/2, ..., -1] / (n*d) . - [tensorplay.fft.fftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.fftn.html): Computes the N-dimensional discrete Fourier transform over dim . - [tensorplay.fft.fftshift](https://www.tensorplay.cn/docs/generated/tensorplay.fft.fftshift.html): Re-orders an N-D FFT output so the zero-frequency term is centered. - [tensorplay.fft.hfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.hfft.html): Computes the 1-D FFT of a Hermitian-symmetric spectrum; real output. - [tensorplay.fft.hfft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.hfft2.html): Two-dimensional inverse of a Hermitian-symmetric spectrum; real output. - [tensorplay.fft.hfftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.hfftn.html): N-dimensional FFT of a Hermitian-symmetric spectrum; real output. - [tensorplay.fft.ifft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ifft.html): Computes the one-dimensional inverse discrete Fourier transform. - [tensorplay.fft.ifft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ifft2.html): Computes the two-dimensional inverse discrete Fourier transform. - [tensorplay.fft.ifftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ifftn.html): Computes the N-dimensional inverse discrete Fourier transform. - [tensorplay.fft.ifftshift](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ifftshift.html): Inverse of fftshift() ; shifts by -(n // 2) (odd-safe). - [tensorplay.fft.ihfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ihfft.html): Computes the inverse of hfft() ; one-sided complex output. - [tensorplay.fft.ihfft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ihfft2.html): Two-dimensional counterpart of ihfft() . - [tensorplay.fft.ihfftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.ihfftn.html): Inverse of hfftn() : ihfft() along the final transformed dimension, then fft() over the remaining dimensions. - [tensorplay.fft.irfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.irfft.html): Computes the inverse of rfft() ; n is the output length. - [tensorplay.fft.irfft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.irfft2.html): Inverse of rfft2() : irfft() on the final dimension first ( s[-1] is the real output size), then ifft() on the rest. - [tensorplay.fft.irfftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.irfftn.html): Inverse of rfftn() ; s[-1] is the real output size. - [tensorplay.fft.rfft](https://www.tensorplay.cn/docs/generated/tensorplay.fft.rfft.html): Computes the one-dimensional FFT of real input, one-sided output. - [tensorplay.fft.rfft2](https://www.tensorplay.cn/docs/generated/tensorplay.fft.rfft2.html): Two-dimensional FFT of real input: fft() on leading dims, then rfft() on the final transformed dimension. - [tensorplay.fft.rfftfreq](https://www.tensorplay.cn/docs/generated/tensorplay.fft.rfftfreq.html): Sample frequencies for rfft() /one-sided transforms: [0..n//2] / (n*d) . - [tensorplay.fft.rfftn](https://www.tensorplay.cn/docs/generated/tensorplay.fft.rfftn.html): N-dimensional FFT of real input; one-sided along the last listed dim. - [tensorplay.fork_rng](https://www.tensorplay.cn/docs/generated/tensorplay.fork_rng.html): Forks the RNG state: code inside the context gets a pristine RNG. - [tensorplay.forward_add](https://www.tensorplay.cn/docs/generated/tensorplay.forward_add.html): - [tensorplay.forward_cos](https://www.tensorplay.cn/docs/generated/tensorplay.forward_cos.html): - [tensorplay.forward_div](https://www.tensorplay.cn/docs/generated/tensorplay.forward_div.html): - [tensorplay.forward_exp](https://www.tensorplay.cn/docs/generated/tensorplay.forward_exp.html): - [tensorplay.forward_log](https://www.tensorplay.cn/docs/generated/tensorplay.forward_log.html): - [tensorplay.forward_mm](https://www.tensorplay.cn/docs/generated/tensorplay.forward_mm.html): - [tensorplay.forward_mul](https://www.tensorplay.cn/docs/generated/tensorplay.forward_mul.html): - [tensorplay.forward_neg](https://www.tensorplay.cn/docs/generated/tensorplay.forward_neg.html): - [tensorplay.forward_pow](https://www.tensorplay.cn/docs/generated/tensorplay.forward_pow.html): - [tensorplay.forward_relu](https://www.tensorplay.cn/docs/generated/tensorplay.forward_relu.html): - [tensorplay.forward_sigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.forward_sigmoid.html): - [tensorplay.forward_sin](https://www.tensorplay.cn/docs/generated/tensorplay.forward_sin.html): - [tensorplay.forward_sqrt](https://www.tensorplay.cn/docs/generated/tensorplay.forward_sqrt.html): - [tensorplay.forward_sub](https://www.tensorplay.cn/docs/generated/tensorplay.forward_sub.html): - [tensorplay.forward_tanh](https://www.tensorplay.cn/docs/generated/tensorplay.forward_tanh.html): - [tensorplay.from_dlpack](https://www.tensorplay.cn/docs/generated/tensorplay.from_dlpack.html): - [tensorplay.functional.abs_](https://www.tensorplay.cn/docs/generated/tensorplay.functional.abs_.html): - [tensorplay.functional.abs](https://www.tensorplay.cn/docs/generated/tensorplay.functional.abs.html): - [tensorplay.functional.acos](https://www.tensorplay.cn/docs/generated/tensorplay.functional.acos.html): - [tensorplay.functional.acosh](https://www.tensorplay.cn/docs/generated/tensorplay.functional.acosh.html): - [tensorplay.functional.add](https://www.tensorplay.cn/docs/generated/tensorplay.functional.add.html): - [tensorplay.functional.addbmm](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addbmm.html): - [tensorplay.functional.addcdiv](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addcdiv.html): - [tensorplay.functional.addcmul](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addcmul.html): - [tensorplay.functional.addmm](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addmm.html): - [tensorplay.functional.addmv](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addmv.html): - [tensorplay.functional.addr](https://www.tensorplay.cn/docs/generated/tensorplay.functional.addr.html): - [tensorplay.functional.airy_ai](https://www.tensorplay.cn/docs/generated/tensorplay.functional.airy_ai.html): - [tensorplay.functional.all](https://www.tensorplay.cn/docs/generated/tensorplay.functional.all.html): - [tensorplay.functional.allclose](https://www.tensorplay.cn/docs/generated/tensorplay.functional.allclose.html): - [tensorplay.functional.amax](https://www.tensorplay.cn/docs/generated/tensorplay.functional.amax.html): - [tensorplay.functional.amin](https://www.tensorplay.cn/docs/generated/tensorplay.functional.amin.html): - [tensorplay.functional.aminmax](https://www.tensorplay.cn/docs/generated/tensorplay.functional.aminmax.html): - [tensorplay.functional.angle](https://www.tensorplay.cn/docs/generated/tensorplay.functional.angle.html): - [tensorplay.functional.any](https://www.tensorplay.cn/docs/generated/tensorplay.functional.any.html): - [tensorplay.functional.arange](https://www.tensorplay.cn/docs/generated/tensorplay.functional.arange.html): - [tensorplay.functional.argmax](https://www.tensorplay.cn/docs/generated/tensorplay.functional.argmax.html): - [tensorplay.functional.argmin](https://www.tensorplay.cn/docs/generated/tensorplay.functional.argmin.html): - [tensorplay.functional.argsort](https://www.tensorplay.cn/docs/generated/tensorplay.functional.argsort.html): - [tensorplay.functional.argwhere](https://www.tensorplay.cn/docs/generated/tensorplay.functional.argwhere.html): - [tensorplay.functional.asin](https://www.tensorplay.cn/docs/generated/tensorplay.functional.asin.html): - [tensorplay.functional.asinh](https://www.tensorplay.cn/docs/generated/tensorplay.functional.asinh.html): - [tensorplay.functional.atan](https://www.tensorplay.cn/docs/generated/tensorplay.functional.atan.html): - [tensorplay.functional.atan2](https://www.tensorplay.cn/docs/generated/tensorplay.functional.atan2.html): - [tensorplay.functional.atanh](https://www.tensorplay.cn/docs/generated/tensorplay.functional.atanh.html): - [tensorplay.functional.gcd](https://www.tensorplay.cn/docs/generated/tensorplay.functional.gcd.html): - [tensorplay.functional.isfinite](https://www.tensorplay.cn/docs/generated/tensorplay.functional.isfinite.html): - [tensorplay.functional.logspace](https://www.tensorplay.cn/docs/generated/tensorplay.functional.logspace.html): - [tensorplay.functional.logsumexp](https://www.tensorplay.cn/docs/generated/tensorplay.functional.logsumexp.html): - [tensorplay.functional.lstm](https://www.tensorplay.cn/docs/generated/tensorplay.functional.lstm.html): - [tensorplay.functional.narrow](https://www.tensorplay.cn/docs/generated/tensorplay.functional.narrow.html): - [tensorplay.functional.ne](https://www.tensorplay.cn/docs/generated/tensorplay.functional.ne.html): - [tensorplay.functional.neg_](https://www.tensorplay.cn/docs/generated/tensorplay.functional.neg_.html): - [tensorplay.functional.neg](https://www.tensorplay.cn/docs/generated/tensorplay.functional.neg.html): - [tensorplay.functional.randint_like](https://www.tensorplay.cn/docs/generated/tensorplay.functional.randint_like.html): - [tensorplay.functional.randint](https://www.tensorplay.cn/docs/generated/tensorplay.functional.randint.html): - [tensorplay.functional.randn_like](https://www.tensorplay.cn/docs/generated/tensorplay.functional.randn_like.html): - [tensorplay.functional.randn](https://www.tensorplay.cn/docs/generated/tensorplay.functional.randn.html): - [tensorplay.functional.randperm](https://www.tensorplay.cn/docs/generated/tensorplay.functional.randperm.html): - [tensorplay.functional.shifted_chebyshev_polynomial_v](https://www.tensorplay.cn/docs/generated/tensorplay.functional.shifted_chebyshev_polynomial_v.html): - [tensorplay.functional.shifted_chebyshev_polynomial_w](https://www.tensorplay.cn/docs/generated/tensorplay.functional.shifted_chebyshev_polynomial_w.html): - [tensorplay.functional.sigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.functional.sigmoid.html): - [tensorplay.functional.sign](https://www.tensorplay.cn/docs/generated/tensorplay.functional.sign.html): - [tensorplay.functional.signbit](https://www.tensorplay.cn/docs/generated/tensorplay.functional.signbit.html): - [tensorplay.functional.tan](https://www.tensorplay.cn/docs/generated/tensorplay.functional.tan.html): - [tensorplay.functional.tanh](https://www.tensorplay.cn/docs/generated/tensorplay.functional.tanh.html): - [tensorplay.functional.tensor_split](https://www.tensorplay.cn/docs/generated/tensorplay.functional.tensor_split.html): - [tensorplay.functional.threshold](https://www.tensorplay.cn/docs/generated/tensorplay.functional.threshold.html): - [tensorplay.functional.tile](https://www.tensorplay.cn/docs/generated/tensorplay.functional.tile.html): - [Future](https://www.tensorplay.cn/docs/generated/tensorplay.futures.Future.html): Holder for an asynchronous result (torch parity subset). - [tensorplay.gammainc](https://www.tensorplay.cn/docs/generated/tensorplay.gammainc.html): - [tensorplay.gammaincc](https://www.tensorplay.cn/docs/generated/tensorplay.gammaincc.html): - [tensorplay.gelu](https://www.tensorplay.cn/docs/generated/tensorplay.gelu.html): - [Generator](https://www.tensorplay.cn/docs/generated/tensorplay.Generator.html): - [tensorplay.geometric_](https://www.tensorplay.cn/docs/generated/tensorplay.geometric_.html): - [GradScaler](https://www.tensorplay.cn/docs/generated/tensorplay.GradScaler.html): An instance scaler of GradScaler . - [tensorplay.in_parallel_region](https://www.tensorplay.cn/docs/generated/tensorplay.in_parallel_region.html): Checks whether the code runs in a parallel region - [tensorplay.index_fill_](https://www.tensorplay.cn/docs/generated/tensorplay.index_fill_.html): - [tensorplay.index_fill](https://www.tensorplay.cn/docs/generated/tensorplay.index_fill.html): - [tensorplay.index_put](https://www.tensorplay.cn/docs/generated/tensorplay.index_put.html): - [tensorplay.initial_seed](https://www.tensorplay.cn/docs/generated/tensorplay.initial_seed.html): - [tensorplay.inner_backward_other](https://www.tensorplay.cn/docs/generated/tensorplay.inner_backward_other.html): - [Layout](https://www.tensorplay.cn/docs/generated/tensorplay.Layout.html): Sparse/dense storage layout tags (mirrors torch.layout loosely). - [tensorplay.linalg.det](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.det.html): - [tensorplay.linalg.eig](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.eig.html): - [tensorplay.linalg.eigh](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.eigh.html): - [tensorplay.linalg.eigvals](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.eigvals.html): - [tensorplay.linalg.eigvalsh](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.eigvalsh.html): - [tensorplay.linalg.householder_product](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.householder_product.html): - [tensorplay.linalg.solve_triangular](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.solve_triangular.html): - [tensorplay.linalg.svd](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.svd.html): - [tensorplay.linalg.svdvals](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.svdvals.html): - [tensorplay.linalg.tensorinv](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.tensorinv.html): - [tensorplay.linalg.tensorsolve](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.tensorsolve.html): Solves A X = B where A and B are (tuples of) matrices interpreted as a single square system over the trailing dimensions. - [tensorplay.linalg.vander](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.vander.html): - [tensorplay.linalg.vecdot](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.vecdot.html): - [tensorplay.linalg.vector_norm](https://www.tensorplay.cn/docs/generated/tensorplay.linalg.vector_norm.html): - [MemoryFormat](https://www.tensorplay.cn/docs/generated/tensorplay.MemoryFormat.html): Tensor memory layout, mirroring torch.MemoryFormat. - [tensorplay.native_dropout](https://www.tensorplay.cn/docs/generated/tensorplay.native_dropout.html): - [tensorplay.nll_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nll_loss.html): - [Buffer](https://www.tensorplay.cn/docs/generated/tensorplay.nn.Buffer.html): A kind of Tensor that should not be considered a model parameter. For example, BatchNorm’s running_mean is not a parameter, but is part of the module’s state. - [DepthwiseConv2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.DepthwiseConv2d.html): Add a child module to the current module. - [tensorplay.nn.factory_kwargs](https://www.tensorplay.cn/docs/generated/tensorplay.nn.factory_kwargs.html): Return a canonicalized dict of factory kwargs. - [tensorplay.nn.functional.adaptive_avg_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_avg_pool1d.html): - [tensorplay.nn.functional.adaptive_avg_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_avg_pool2d.html): - [tensorplay.nn.functional.adaptive_avg_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_avg_pool3d.html): Apply a 3D adaptive average pooling over an input signal. - [tensorplay.nn.functional.adaptive_max_pool1d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_max_pool1d_with_indices.html): Applies a 1D adaptive max pooling over an input signal, returning (output, indices) . - [tensorplay.nn.functional.adaptive_max_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_max_pool1d.html): - [tensorplay.nn.functional.adaptive_max_pool2d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_max_pool2d_with_indices.html): Applies a 2D adaptive max pooling over an input signal composed of several input planes, returning (output, indices) . - [tensorplay.nn.functional.adaptive_max_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_max_pool2d.html): - [tensorplay.nn.functional.adaptive_max_pool3d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.adaptive_max_pool3d_with_indices.html): Applies a 3D adaptive max pooling over an input signal, returning (output, indices) . - [tensorplay.nn.functional.affine_grid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.affine_grid.html): Generate 2D or 3D flow field (sampling grid), given a batch of affine matrices theta . - [tensorplay.nn.functional.alpha_dropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.alpha_dropout.html): - [tensorplay.nn.functional.avg_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.avg_pool1d.html): avg_pool1d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) -> Tensor - [tensorplay.nn.functional.avg_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.avg_pool2d.html): - [tensorplay.nn.functional.avg_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.avg_pool3d.html): avg_pool3d(input, kernel_size, stride=None, padding=0, ceil_mode=False, count_include_pad=True, divisor_override=None) -> Tensor - [tensorplay.nn.functional.batch_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.batch_norm.html): - [tensorplay.nn.functional.bilinear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.bilinear.html): - [tensorplay.nn.functional.binary_cross_entropy](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.binary_cross_entropy.html): Compute Binary Cross Entropy between the target and input probabilities. - [tensorplay.nn.functional.channel_shuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.channel_shuffle.html): Divide the channels in a tensor into g groups and rearrange them as in ShuffleNet: (*, C, H, W) -> (*, C, H, W) with channels interleaved across groups. - [tensorplay.nn.functional.conv_tbc](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv_tbc.html): Applies a 1D convolution over an input of shape (T, B, C) along the time dimension (torch.conv_tbc). Expressed as a grouped (depthwise) conv1d: every channel is convolved with its own length-k filter. - [tensorplay.nn.functional.conv_transpose1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv_transpose1d.html): - [tensorplay.nn.functional.conv_transpose2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv_transpose2d.html): - [tensorplay.nn.functional.conv_transpose3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv_transpose3d.html): - [tensorplay.nn.functional.conv1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv1d.html): Applies a 1D convolution over an input signal composed of several input planes. - [tensorplay.nn.functional.conv2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv2d.html): Applies a 2D convolution over an input image composed of several input planes. - [tensorplay.nn.functional.conv3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.conv3d.html): Applies a 3D convolution over an input image composed of several input planes. - [tensorplay.nn.functional.cosine_embedding_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.cosine_embedding_loss.html): Compute the cosine embedding loss. - [tensorplay.nn.functional.cosine_similarity](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.cosine_similarity.html): Returns cosine similarity between x1 and x2, computed along dim. - [tensorplay.nn.functional.cross_entropy](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.cross_entropy.html): Compute the cross entropy loss between input logits and target. - [tensorplay.nn.functional.ctc_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.ctc_loss.html): Compute the Connectionist Temporal Classification loss. - [tensorplay.nn.functional.dropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.dropout.html): - [tensorplay.nn.functional.dropout1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.dropout1d.html): Randomly zero out entire channels (a channel is a 1D feature map). - [tensorplay.nn.functional.dropout2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.dropout2d.html): - [tensorplay.nn.functional.dropout3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.dropout3d.html): - [DType](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.DType.html): Members: - [tensorplay.nn.functional.elu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.elu.html): - [tensorplay.nn.functional.embedding_bag](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.embedding_bag.html): Compute sums, means or maxes of bags of embeddings. - [tensorplay.nn.functional.embedding](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.embedding.html): - [tensorplay.nn.functional.feature_alpha_dropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.feature_alpha_dropout.html): Randomly masks out entire channels, setting activations to the negative saturation value of the SELU activation function. - [tensorplay.nn.functional.flatten](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.flatten.html): - [tensorplay.nn.functional.fold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.fold.html): Combine an array of sliding local blocks into a tensor containing them all (torch F.fold, i.e. aten::col2im). - [tensorplay.nn.functional.fractional_max_pool2d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.fractional_max_pool2d_with_indices.html): Applies 2D fractional max pooling over an input signal composed of several input planes, returning (output, indices) . - [tensorplay.nn.functional.fractional_max_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.fractional_max_pool2d.html): Applies 2D fractional max pooling over an input signal. - [tensorplay.nn.functional.fractional_max_pool3d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.fractional_max_pool3d_with_indices.html): Applies 3D fractional max pooling over an input signal composed of several input planes, returning (output, indices) . - [tensorplay.nn.functional.fractional_max_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.fractional_max_pool3d.html): Applies 3D fractional max pooling over an input signal. - [tensorplay.nn.functional.gaussian_nll_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.gaussian_nll_loss.html): Compute the Gaussian negative log likelihood loss. - [tensorplay.nn.functional.gelu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.gelu.html): When approximate is ‘none’, applies \(\text{GELU}(x) = x * \Phi(x)\) ; ‘tanh’ uses the tanh estimation. - [tensorplay.nn.functional.glu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.glu.html): Gated Linear Unit: \(a * \sigma(b)\) where the input is split in half along dim . - [tensorplay.nn.functional.grid_sample](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.grid_sample.html): Compute grid sample. - [tensorplay.nn.functional.group_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.group_norm.html): - [tensorplay.nn.functional.grouped_mm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.grouped_mm.html): - [tensorplay.nn.functional.gumbel_softmax](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.gumbel_softmax.html): Sample from the Gumbel-Softmax distribution and optionally discretize. - [tensorplay.nn.functional.hardshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.hardshrink.html): Applies the hard shrinkage function element-wise. - [tensorplay.nn.functional.hardsigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.hardsigmoid.html): - [tensorplay.nn.functional.hardswish](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.hardswish.html): - [tensorplay.nn.functional.hardtanh](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.hardtanh.html): - [tensorplay.nn.functional.hinge_embedding_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.hinge_embedding_loss.html): Compute the hinge embedding loss. - [tensorplay.nn.functional.huber_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.huber_loss.html): Compute the Huber loss, with optional weighting. - [tensorplay.nn.functional.instance_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.instance_norm.html): - [tensorplay.nn.functional.interpolate](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.interpolate.html): interpolate(input, size=None, scale_factor=None, mode=’nearest’, align_corners=None) -> Tensor - [tensorplay.nn.functional.kl_div](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.kl_div.html): Compute the KL Divergence loss. - [tensorplay.nn.functional.l1_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.l1_loss.html): Compute the L1 loss, with optional weighting. - [tensorplay.nn.functional.layer_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.layer_norm.html): - [tensorplay.nn.functional.leaky_relu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.leaky_relu.html): - [tensorplay.nn.functional.linear_cross_entropy](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.linear_cross_entropy.html): Compute cross entropy between input , transformed linearly, and target. - [tensorplay.nn.functional.linear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.linear.html): Applies a linear transformation to the incoming data: \(y = xA^T + b\) . - [tensorplay.nn.functional.local_response_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.local_response_norm.html): Apply local response normalization over an input signal. - [tensorplay.nn.functional.log_softmax](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.log_softmax.html): - [tensorplay.nn.functional.logsigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.logsigmoid.html): Applies element-wise \(\text{LogSigmoid}(x_i) = \log \left(\frac{1}{1 + \exp(-x_i)}\right)\) - [tensorplay.nn.functional.lp_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.lp_pool1d.html): Apply a 1D power-average pooling over an input signal. - [tensorplay.nn.functional.lp_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.lp_pool2d.html): Apply a 2D power-average pooling over an input signal. - [tensorplay.nn.functional.lp_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.lp_pool3d.html): Apply a 3D power-average pooling over an input signal. - [tensorplay.nn.functional.margin_ranking_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.margin_ranking_loss.html): Compute the margin ranking loss. - [tensorplay.nn.functional.max_pool1d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool1d_with_indices.html): Applies a 1D max pooling over an input signal, returning (output, indices) . - [tensorplay.nn.functional.max_pool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool1d.html): max_pool1d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) -> Tensor - [tensorplay.nn.functional.max_pool2d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool2d_with_indices.html): Applies a 2D max pooling over an input composed of several input planes, returning (output, indices) . - [tensorplay.nn.functional.max_pool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool2d.html): - [tensorplay.nn.functional.max_pool3d_with_indices](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool3d_with_indices.html): Applies a 3D max pooling over an input signal, returning (output, indices) . - [tensorplay.nn.functional.max_pool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_pool3d.html): max_pool3d(input, kernel_size, stride=None, padding=0, dilation=1, ceil_mode=False, return_indices=False) -> Tensor - [tensorplay.nn.functional.max_unpool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_unpool1d.html): Compute a partial inverse of MaxPool1d . - [tensorplay.nn.functional.max_unpool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_unpool2d.html): Compute a partial inverse of MaxPool2d . - [tensorplay.nn.functional.max_unpool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.max_unpool3d.html): Compute a partial inverse of MaxPool3d . - [tensorplay.nn.functional.mish](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.mish.html): - [tensorplay.nn.functional.mse_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.mse_loss.html): - [tensorplay.nn.functional.multi_head_attention_forward](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.multi_head_attention_forward.html): torch-compatible multi_head_attention_forward. - [tensorplay.nn.functional.multi_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.multi_margin_loss.html): Compute the multi margin loss, with optional weighting. - [tensorplay.nn.functional.multilabel_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.multilabel_margin_loss.html): Compute the multilabel margin loss. - [tensorplay.nn.functional.multilabel_soft_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.multilabel_soft_margin_loss.html): Compute the multilabel soft margin loss. - [tensorplay.nn.functional.native_channel_shuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.native_channel_shuffle.html): Native channel shuffle primitive (torch.native_channel_shuffle). - [tensorplay.nn.functional.nll_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.nll_loss.html): The negative log likelihood loss. - [tensorplay.nn.functional.normalize](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.normalize.html): Performs \(L_p\) normalization over the specified dimension — torch.nn.functional.normalize divides by clamp_min(norm, eps). - [tensorplay.nn.functional.one_hot](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.one_hot.html): Returns long tensor shaped tensor.shape + (num_classes,) with a 1 at each label position — port of ATen one_hot. - [tensorplay.nn.functional.pad](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pad.html): Pads tensor. pad values are described starting from the last dimension and moving forward, exactly like torch.nn.functional.pad. Non-constant modes support the last 3 dimensions of a 3D/4D/5D input (torch’s restriction). - [tensorplay.nn.functional.pairwise_distance](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pairwise_distance.html): Computes the pairwise distance between input vectors. - [tensorplay.nn.functional.pdist](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pdist.html): Computes the pairwise distance between rows of input . - [tensorplay.nn.functional.pixel_shuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pixel_shuffle.html): Rearranges elements in a tensor of shape (*, C x r^2, H, W) to a tensor of shape (*, C, H x r, W x r) . - [tensorplay.nn.functional.pixel_unshuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.pixel_unshuffle.html): Reverses the pixel_shuffle() transformation: (*, C, H x r, W x r) -> (*, C x r^2, H, W) . - [tensorplay.nn.functional.poisson_nll_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.poisson_nll_loss.html): Compute the Poisson negative log likelihood loss. - [tensorplay.nn.functional.prelu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.prelu.html): - [tensorplay.nn.functional.relu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.relu.html): - [tensorplay.nn.functional.relu6](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.relu6.html): ReLU6: \(\min(\max(0, x), 6)\) — torch.nn.functional.relu6. - [tensorplay.nn.functional.rms_norm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.rms_norm.html): Apply Root Mean Square Layer Normalization — composed per the ATen rms_norm composite (fp32 compute for reduced dtypes). - [tensorplay.nn.functional.rrelu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.rrelu.html): Randomized leaky ReLU. - [tensorplay.nn.functional.scaled_dot_product_attention](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.scaled_dot_product_attention.html): scaled_dot_product_attention(query, key, value, attn_mask=None, dropout_p=0.0, is_causal=False, scale=None, backend=None) -> Tensor - [tensorplay.nn.functional.scaled_grouped_mm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.scaled_grouped_mm.html): - [tensorplay.nn.functional.scaled_mm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.scaled_mm.html): - [tensorplay.nn.functional.selu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.selu.html): - [tensorplay.nn.functional.sigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.sigmoid.html): Applies the element-wise function \(\text{Sigmoid}(x) = \frac{1}{1 + \exp(-x)}\) - [tensorplay.nn.functional.silu](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.silu.html): Apply the Sigmoid Linear Unit (SiLU) function, element-wise. - [tensorplay.nn.functional.smooth_l1_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.smooth_l1_loss.html): Compute the Smooth L1 loss. - [tensorplay.nn.functional.soft_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.soft_margin_loss.html): Compute the soft margin loss. - [tensorplay.nn.functional.softmax](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.softmax.html): - [tensorplay.nn.functional.softmin](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.softmin.html): Apply a softmin function. - [tensorplay.nn.functional.softplus](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.softplus.html): - [tensorplay.nn.functional.softshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.softshrink.html): Applies the soft shrinkage function element-wise. - [tensorplay.nn.functional.softsign](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.softsign.html): Applies element-wise, the function \(\text{SoftSign}(x) = \frac{x}{1 + |x|}\) - [tensorplay.nn.functional.tanh](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.tanh.html): Applies element-wise \(\text{Tanh}(x) = \frac{\exp(x) - \exp(-x)}{\exp(x) + \exp(-x)}\) - [tensorplay.nn.functional.tanhshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.tanhshrink.html): Applies element-wise, \(\text{Tanhshrink}(x) = x - \text{Tanh}(x)\) - [Tensor](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.Tensor.html): alias of TensorBase - [tensorplay.nn.functional.threshold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.threshold.html): Apply a threshold to each element of the input Tensor. - [tensorplay.nn.functional.triplet_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.triplet_margin_loss.html): Compute the triplet loss between given input tensors and a margin greater than 0. - [tensorplay.nn.functional.triplet_margin_with_distance_loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.triplet_margin_with_distance_loss.html): Compute the triplet margin loss using a custom distance function. - [tensorplay.nn.functional.unfold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.unfold.html): Extract sliding local blocks from a batched input tensor (torch F.unfold, i.e. aten::im2col). 4-D batched input is the common case; unbatched 3-D input is accepted like aten’s im2col. - [tensorplay.nn.functional.upsample_bilinear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.upsample_bilinear.html): Upsamples the input using bilinear upsampling. - [tensorplay.nn.functional.upsample_nearest](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.upsample_nearest.html): Upsamples the input using nearest neighbours. - [tensorplay.nn.functional.upsample](https://www.tensorplay.cn/docs/generated/tensorplay.nn.functional.upsample.html): Upsamples the input to the given size or scale_factor . - [tensorplay.nn.init.calculate_gain](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.calculate_gain.html): - [tensorplay.nn.init.constant_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.constant_.html): - [tensorplay.nn.init.dirac_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.dirac_.html): - [tensorplay.nn.init.eye_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.eye_.html): - [tensorplay.nn.init.kaiming_normal_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.kaiming_normal_.html): - [tensorplay.nn.init.kaiming_uniform_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.kaiming_uniform_.html): - [tensorplay.nn.init.normal_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.normal_.html): - [tensorplay.nn.init.ones_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.ones_.html): - [tensorplay.nn.init.orthogonal_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.orthogonal_.html): - [tensorplay.nn.init.sparse_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.sparse_.html): - [tensorplay.nn.init.trunc_normal_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.trunc_normal_.html): Fills the input Tensor with values drawn from a truncated normal distribution. - [tensorplay.nn.init.uniform_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.uniform_.html): - [tensorplay.nn.init.xavier_normal_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.xavier_normal_.html): - [tensorplay.nn.init.xavier_uniform_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.xavier_uniform_.html): - [tensorplay.nn.init.zeros_](https://www.tensorplay.cn/docs/generated/tensorplay.nn.init.zeros_.html): - [CELU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.CELU.html): Applies celu: max(0, x) + min(0, alpha * (exp(x / alpha) - 1)) . - [ELU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.ELU.html): Applies elu: max(0, x) + min(0, alpha * (exp(x) - 1)) . - [GLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.GLU.html): Applies the Gaussian Error Linear Units function. - [Hardshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Hardshrink.html): Applies the Hard Shrinkage (Hardshrink) function element-wise. - [Hardsigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Hardsigmoid.html): Applies hardsigmoid, element-wise: ReLU6(x + 3) / 6 . - [Hardswish](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Hardswish.html): Applies hardswish, element-wise: x * ReLU6(x + 3) / 6 . - [Hardtanh](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Hardtanh.html): Applies the HardTanh function element-wise. - [LeakyReLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.LeakyReLU.html): Applies leaky_relu: max(0, x) + negative_slope * min(0, x) . - [LogSigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.LogSigmoid.html): Applies the Logsigmoid function element-wise. - [LogSoftmax](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.LogSoftmax.html): Log-softmax over dim , mirroring torch.nn.LogSoftmax. - [Mish](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Mish.html): Applies mish: x * tanh(softplus(x)) . - [PReLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.PReLU.html): Applies the element-wise PReLU function. - [ReLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.ReLU.html): Applies the rectified linear unit function element-wise. - [ReLU6](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.ReLU6.html): Applies the element-wise function ReLU6(x) = min(max(0, x), 6) . - [RReLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.RReLU.html): Applies the randomized leaky rectified linear unit function, element-wise. - [SELU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.SELU.html): Applies selu with ATen’s fixed lambda/alpha constants. - [Sigmoid](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Sigmoid.html): Applies the Sigmoid function element-wise. - [SiLU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.SiLU.html): Applies the Sigmoid Linear Unit (SiLU) function, element-wise. - [Softmax](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Softmax.html): Softmax over dim , mirroring torch.nn.Softmax. - [Softmin](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Softmin.html): Applies the Softmin function to an n-dimensional input Tensor. - [Softplus](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Softplus.html): Applies softplus with linearization above threshold * beta . - [Softshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Softshrink.html): Applies the soft shrinkage function element-wise. - [Softsign](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Softsign.html): Applies the element-wise function: - [Tanh](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Tanh.html): Applies the Hyperbolic Tangent (Tanh) function element-wise. - [Tanhshrink](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Tanhshrink.html): Applies element-wise, \(\text{Tanhshrink}(x) = x - \text{Tanh}(x)\) - [Threshold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.activation.Threshold.html): Thresholds each element of the input Tensor. - [AdaptiveLogSoftmaxWithLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.adaptive.AdaptiveLogSoftmaxWithLoss.html): Efficient softmax approximation. - [BatchNorm1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.BatchNorm1d.html): Applies Batch Normalization over a 2D or 3D input. - [BatchNorm3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.BatchNorm3d.html): Applies Batch Normalization over a 5D input. - [LazyBatchNorm1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.LazyBatchNorm1d.html): A tensorplay.nn.BatchNorm1d module with lazy initialization. - [LazyBatchNorm2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.LazyBatchNorm2d.html): A tensorplay.nn.BatchNorm2d module with lazy initialization. - [LazyBatchNorm3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.LazyBatchNorm3d.html): A tensorplay.nn.BatchNorm3d module with lazy initialization. - [SyncBatchNorm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.batchnorm.SyncBatchNorm.html): Applies Batch Normalization over a N-Dimensional input with synchronized batch statistics across all processes in the group. - [ChannelShuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.channelshuffle.ChannelShuffle.html): Divides and rearranges the channels in a tensor. - [ModuleDict](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.container.ModuleDict.html): Holds submodules in a dictionary. - [ModuleList](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.container.ModuleList.html): Holds submodules in a list. - [ParameterDict](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.container.ParameterDict.html): Holds parameters in a dictionary. - [ParameterList](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.container.ParameterList.html): Holds parameters in a list. - [Sequential](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.container.Sequential.html): A sequential container. - [Conv1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.Conv1d.html): Add a child module to the current module. - [Conv2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.Conv2d.html): Add a child module to the current module. - [Conv3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.Conv3d.html): Add a child module to the current module. - [ConvTranspose1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.ConvTranspose1d.html): Add a child module to the current module. - [ConvTranspose2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.ConvTranspose2d.html): Add a child module to the current module. - [ConvTranspose3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.ConvTranspose3d.html): Add a child module to the current module. - [LazyConv1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConv1d.html): Add a child module to the current module. - [LazyConv2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConv2d.html): Add a child module to the current module. - [LazyConv3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConv3d.html): Add a child module to the current module. - [LazyConvTranspose1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConvTranspose1d.html): Add a child module to the current module. - [LazyConvTranspose2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConvTranspose2d.html): Add a child module to the current module. - [LazyConvTranspose3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.conv.LazyConvTranspose3d.html): Add a child module to the current module. - [CosineSimilarity](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.distance.CosineSimilarity.html): Returns cosine similarity between \(x_1\) and \(x_2\) , computed along dim . - [PairwiseDistance](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.distance.PairwiseDistance.html): Computes the pairwise distance between input vectors, or between columns of input matrices. - [AlphaDropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.AlphaDropout.html): Applies Alpha Dropout over the input. - [Dropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.Dropout.html): During training, randomly zeroes some of the elements of the input tensor with probability p . - [Dropout1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.Dropout1d.html): Randomly zero out entire channels. - [Dropout2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.Dropout2d.html): Randomly zero out entire channels. - [Dropout3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.Dropout3d.html): Randomly zero out entire channels. - [FeatureAlphaDropout](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.dropout.FeatureAlphaDropout.html): Randomly masks out entire channels. - [Flatten](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.flatten.Flatten.html): Flattens a contiguous range of dims into a tensor. - [Unflatten](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.flatten.Unflatten.html): Unflattens a tensor dim expanding it to a desired shape. For use with Sequential . - [Fold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.folding.Fold.html): Combines an array of sliding local blocks into a large containing tensor (torch torch.nn.Fold ). - [Unfold](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.folding.Unfold.html): Extracts sliding local blocks from a batched input tensor (torch torch.nn.Unfold ). - [InstanceNorm1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.InstanceNorm1d.html): Applies Instance Normalization. - [InstanceNorm2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.InstanceNorm2d.html): Applies Instance Normalization. - [InstanceNorm3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.InstanceNorm3d.html): Applies Instance Normalization. - [LazyInstanceNorm1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.LazyInstanceNorm1d.html): A tensorplay.nn.InstanceNorm1d module with lazy initialization of the num_features argument. - [LazyInstanceNorm2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.LazyInstanceNorm2d.html): A tensorplay.nn.InstanceNorm2d module with lazy initialization of the num_features argument. - [LazyInstanceNorm3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.instancenorm.LazyInstanceNorm3d.html): A tensorplay.nn.InstanceNorm3d module with lazy initialization of the num_features argument. - [LazyLinear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.lazy.LazyLinear.html): A tensorplay.nn.Linear module where in_features is inferred. - [LazyModuleMixin](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.lazy.LazyModuleMixin.html): A mixin for modules that lazily initialize parameters, also known as “lazy modules”. - [Bilinear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.linear.Bilinear.html): Applies a bilinear transformation to the incoming data: \(y = x_1^T A x_2 + b\) . - [Identity](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.linear.Identity.html): A placeholder identity operator that is argument-insensitive. - [Linear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.linear.Linear.html): Applies an affine linear transformation to the incoming data: \(y = xA^T + b\) . - [BCELoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.BCELoss.html): Add a child module to the current module. - [BCEWithLogitsLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.BCEWithLogitsLoss.html): Add a child module to the current module. - [CosineEmbeddingLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.CosineEmbeddingLoss.html): Add a child module to the current module. - [CrossEntropyLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.CrossEntropyLoss.html): Add a child module to the current module. - [CTCLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.CTCLoss.html): Add a child module to the current module. - [GaussianNLLLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.GaussianNLLLoss.html): Add a child module to the current module. - [HingeEmbeddingLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.HingeEmbeddingLoss.html): Add a child module to the current module. - [HuberLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.HuberLoss.html): Add a child module to the current module. - [KLDivLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.KLDivLoss.html): Add a child module to the current module. - [L1Loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.L1Loss.html): Add a child module to the current module. - [MarginRankingLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.MarginRankingLoss.html): Add a child module to the current module. - [MSELoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.MSELoss.html): Add a child module to the current module. - [MultiLabelMarginLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.MultiLabelMarginLoss.html): Add a child module to the current module. - [MultiLabelSoftMarginLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.MultiLabelSoftMarginLoss.html): Add a child module to the current module. - [MultiMarginLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.MultiMarginLoss.html): Add a child module to the current module. - [NLLLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.NLLLoss.html): Add a child module to the current module. - [PoissonNLLLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.PoissonNLLLoss.html): Add a child module to the current module. - [SmoothL1Loss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.SmoothL1Loss.html): Add a child module to the current module. - [SoftMarginLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.SoftMarginLoss.html): Add a child module to the current module. - [TripletMarginLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.TripletMarginLoss.html): Add a child module to the current module. - [TripletMarginWithDistanceLoss](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.loss.TripletMarginWithDistanceLoss.html): Add a child module to the current module. - [Module](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.Module.html): Base class for all neural network modules. - [tensorplay.nn.modules.module.register_module_backward_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_backward_hook.html): Register a backward hook common to all the modules. - [tensorplay.nn.modules.module.register_module_buffer_registration_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_buffer_registration_hook.html): Register a buffer registration hook common to all modules. - [tensorplay.nn.modules.module.register_module_forward_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_forward_hook.html): Register a global forward hook for all the modules. - [tensorplay.nn.modules.module.register_module_forward_pre_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_forward_pre_hook.html): Register a forward pre-hook common to all modules. - [tensorplay.nn.modules.module.register_module_full_backward_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_full_backward_hook.html): Register a backward hook common to all the modules. - [tensorplay.nn.modules.module.register_module_full_backward_pre_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_full_backward_pre_hook.html): Register a backward pre-hook common to all the modules. - [tensorplay.nn.modules.module.register_module_module_registration_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_module_registration_hook.html): Register a module registration hook common to all modules. - [tensorplay.nn.modules.module.register_module_parameter_registration_hook](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.module.register_module_parameter_registration_hook.html): Register a parameter registration hook common to all modules. - [MultiheadAttention](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.multihead_attention.MultiheadAttention.html): Allows the model to jointly attend to information from different representation subspaces, as described in the paper Attention Is All You Need . - [GroupNorm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.normalization.GroupNorm.html): Applies Group Normalization over a mini-batch of inputs. - [LayerNorm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.normalization.LayerNorm.html): Applies Layer Normalization over a mini-batch of inputs. - [LocalResponseNorm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.normalization.LocalResponseNorm.html): Applies local response normalization over an input signal. - [RMSNorm](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.normalization.RMSNorm.html): Applies Root Mean Square Layer Normalization over a mini-batch of inputs. - [CircularPad1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.CircularPad1d.html): Pads the input tensor using circular padding of the input boundary. - [CircularPad2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.CircularPad2d.html): Pads the input tensor using circular padding of the input boundary. - [CircularPad3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.CircularPad3d.html): Pads the input tensor using circular padding of the input boundary. - [ConstantPad1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ConstantPad1d.html): Pads the input tensor boundaries with a constant value. - [ConstantPad2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ConstantPad2d.html): Pads the input tensor boundaries with a constant value. - [ConstantPad3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ConstantPad3d.html): Pads the input tensor boundaries with a constant value. - [ReflectionPad1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReflectionPad1d.html): Pads the input tensor using the reflection of the input boundary. - [ReflectionPad2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReflectionPad2d.html): Pads the input tensor using the reflection of the input boundary. - [ReflectionPad3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReflectionPad3d.html): Pads the input tensor using the reflection of the input boundary. - [ReplicationPad1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReplicationPad1d.html): Pads the input tensor using replication of the input boundary. - [ReplicationPad2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReplicationPad2d.html): Pads the input tensor using replication of the input boundary. - [ReplicationPad3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ReplicationPad3d.html): Pads the input tensor using replication of the input boundary. - [ZeroPad1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ZeroPad1d.html): Pads the input tensor boundaries with zero. - [ZeroPad2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ZeroPad2d.html): Pads the input tensor boundaries with zero. - [ZeroPad3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.padding.ZeroPad3d.html): Pads the input tensor boundaries with zero. - [PixelShuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pixelshuffle.PixelShuffle.html): Rearrange elements in a tensor according to an upscaling factor. - [PixelUnshuffle](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pixelshuffle.PixelUnshuffle.html): Reverse the PixelShuffle operation. - [AdaptiveAvgPool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveAvgPool1d.html): Applies a 1D adaptive average pooling over an input signal composed of several input planes. - [AdaptiveAvgPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveAvgPool2d.html): Applies a 2D adaptive average pooling over an input signal composed of several input planes. - [AdaptiveAvgPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveAvgPool3d.html): Applies a 3D adaptive average pooling over an input signal composed of several input planes. - [AdaptiveMaxPool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveMaxPool1d.html): Applies a 1D adaptive max pooling over an input signal composed of several input planes. - [AdaptiveMaxPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveMaxPool2d.html): Applies a 2D adaptive max pooling over an input signal composed of several input planes. - [AdaptiveMaxPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AdaptiveMaxPool3d.html): Applies a 3D adaptive max pooling over an input signal composed of several input planes. - [AvgPool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AvgPool1d.html): Applies a 1D average pooling over an input signal composed of several input planes. - [AvgPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AvgPool2d.html): Applies a 2D average pooling over an input signal composed of several input planes. - [AvgPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.AvgPool3d.html): Applies a 3D average pooling over an input signal composed of several input planes. - [FractionalMaxPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.FractionalMaxPool2d.html): Applies a 2D fractional max pooling over an input signal composed of several input planes. - [FractionalMaxPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.FractionalMaxPool3d.html): Applies a 3D fractional max pooling over an input signal composed of several input planes. - [LPPool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.LPPool1d.html): Applies a 1D power-average pooling over an input signal composed of several input planes. - [LPPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.LPPool2d.html): Applies a 2D power-average pooling over an input signal composed of several input planes. - [LPPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.LPPool3d.html): Applies a 3D power-average pooling over an input signal composed of several input planes. - [MaxPool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxPool1d.html): Applies a 1D max pooling over an input signal composed of several input planes. - [MaxPool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxPool2d.html): Applies a 2D max pooling over an input signal composed of several input planes. - [MaxPool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxPool3d.html): Applies a 3D max pooling over an input signal composed of several input planes. - [MaxUnpool1d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxUnpool1d.html): Computes a partial inverse of MaxPool1d . - [MaxUnpool2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxUnpool2d.html): Computes a partial inverse of MaxPool2d . - [MaxUnpool3d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.pooling.MaxUnpool3d.html): Computes a partial inverse of MaxPool3d . - [GRU](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.GRU.html): __init__(input_size, hidden_size, num_layers=1, bias=True, batch_first=False, dropout=0.0, bidirectional=False, device=None, dtype=None) - [GRUCell](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.GRUCell.html): A gated recurrent unit (GRU) cell. - [LSTM](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.LSTM.html): __init__(input_size, hidden_size, num_layers=1, bias=True, batch_first=False, dropout=0.0, bidirectional=False, proj_size=0, device=None, dtype=None) - [LSTMCell](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.LSTMCell.html): A long short-term memory (LSTM) cell. - [RNN](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.RNN.html): __init__(input_size, hidden_size, num_layers=1, nonlinearity=’tanh’, bias=True, batch_first=False, dropout=0.0, bidirectional=False, device=None, dtype=None) - [RNNBase](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.RNNBase.html): Base class for RNN modules (RNN, LSTM, GRU). - [RNNCell](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.rnn.RNNCell.html): An Elman RNN cell with tanh or ReLU non-linearity. - [Embedding](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.sparse.Embedding.html): Add a child module to the current module. - [EmbeddingBag](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.sparse.EmbeddingBag.html): Add a child module to the current module. - [Transformer](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.transformer.Transformer.html): A basic transformer layer. - [TransformerDecoder](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.transformer.TransformerDecoder.html): TransformerDecoder is a stack of N decoder layers. - [TransformerDecoderLayer](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.transformer.TransformerDecoderLayer.html): TransformerDecoderLayer is made up of self-attn, multi-head-attn and feedforward network. - [TransformerEncoder](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.transformer.TransformerEncoder.html): TransformerEncoder is a stack of N encoder layers. - [TransformerEncoderLayer](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.transformer.TransformerEncoderLayer.html): TransformerEncoderLayer is made up of self-attn and feedforward network. - [Upsample](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.upsampling.Upsample.html): Upsamples a given multi-channel 1D (temporal), 2D (spatial) or 3D (volumetric) data. - [UpsamplingBilinear2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.upsampling.UpsamplingBilinear2d.html): Applies a 2D bilinear upsampling to an input signal composed of several input channels. - [UpsamplingNearest2d](https://www.tensorplay.cn/docs/generated/tensorplay.nn.modules.upsampling.UpsamplingNearest2d.html): Applies a 2D nearest neighbor upsampling to an input signal composed of several input channels. - [NonDynamicallyQuantizableLinear](https://www.tensorplay.cn/docs/generated/tensorplay.nn.NonDynamicallyQuantizableLinear.html): Add a child module to the current module. - [DataParallel](https://www.tensorplay.cn/docs/generated/tensorplay.nn.parallel.data_parallel.DataParallel.html): Implements data parallelism at the module level. - [DistributedDataParallel](https://www.tensorplay.cn/docs/generated/tensorplay.nn.parallel.distributed.DistributedDataParallel.html): Implements distributed data parallelism (torch parity). - [Parameter](https://www.tensorplay.cn/docs/generated/tensorplay.nn.Parameter.html): A kind of Tensor that is to be considered a module parameter. - [tensorplay.nn.parameter.is_lazy](https://www.tensorplay.cn/docs/generated/tensorplay.nn.parameter.is_lazy.html): Returns whether param is an UninitializedParameter or UninitializedBuffer . - [RNNCellBase](https://www.tensorplay.cn/docs/generated/tensorplay.nn.RNNCellBase.html): Add a child module to the current module. - [UninitializedBuffer](https://www.tensorplay.cn/docs/generated/tensorplay.nn.UninitializedBuffer.html): A buffer that is not initialized. - [UninitializedParameter](https://www.tensorplay.cn/docs/generated/tensorplay.nn.UninitializedParameter.html): A parameter that is not initialized. - [tensorplay.nn.utils.rnn.invert_permutation](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.invert_permutation.html): Returns the inverse of permutation . - [tensorplay.nn.utils.rnn.pack_padded_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.pack_padded_sequence.html): Packs a Tensor containing padded sequences of variable length. - [tensorplay.nn.utils.rnn.pack_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.pack_sequence.html): Packs a list of variable length Tensors. - [PackedSequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.PackedSequence.html): Holds the data and list of batch_sizes of a packed sequence. - [tensorplay.nn.utils.rnn.pad_packed_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.pad_packed_sequence.html): Pad a packed batch of variable length sequences. - [tensorplay.nn.utils.rnn.pad_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.pad_sequence.html): Pad a list of variable length Tensors with padding_value . - [tensorplay.nn.utils.rnn.unpack_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.unpack_sequence.html): Unpack PackedSequence into a list of variable length Tensors. - [tensorplay.nn.utils.rnn.unpad_sequence](https://www.tensorplay.cn/docs/generated/tensorplay.nn.utils.rnn.unpad_sequence.html): Unpad padded Tensor into a list of variable length Tensors. - [tensorplay.normal_](https://www.tensorplay.cn/docs/generated/tensorplay.normal_.html): - [tensorplay.one_hot](https://www.tensorplay.cn/docs/generated/tensorplay.one_hot.html): - [Adadelta](https://www.tensorplay.cn/docs/generated/tensorplay.optim.adadelta.Adadelta.html): Adadelta optimizer matching torch.optim.Adadelta . - [Adafactor](https://www.tensorplay.cn/docs/generated/tensorplay.optim.Adafactor.html): Implements Adafactor algorithm. - [Adagrad](https://www.tensorplay.cn/docs/generated/tensorplay.optim.adagrad.Adagrad.html): Calls tensor.share_memory_() on the state sum tensors. - [Adam](https://www.tensorplay.cn/docs/generated/tensorplay.optim.adam.Adam.html): - [Adamax](https://www.tensorplay.cn/docs/generated/tensorplay.optim.adamax.Adamax.html): Adamax optimizer matching torch.optim.Adamax . - [AdamW](https://www.tensorplay.cn/docs/generated/tensorplay.optim.adamw.AdamW.html): Adam with decoupled weight decay, matching torch.optim.AdamW . - [ASGD](https://www.tensorplay.cn/docs/generated/tensorplay.optim.asgd.ASGD.html): Averaged stochastic gradient descent. - [LBFGS](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lbfgs.LBFGS.html): Limited-memory BFGS optimizer, aligned with torch.optim.LBFGS . - [ChainedScheduler](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.ChainedScheduler.html): Chains a list of learning rate schedulers. - [ConstantLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.ConstantLR.html): Multiply the learning rate of each parameter group by a small constant factor. - [CosineAnnealingLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.CosineAnnealingLR.html): Set the learning rate of each parameter group using a cosine annealing schedule. - [CosineAnnealingWarmRestarts](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.CosineAnnealingWarmRestarts.html): Set the learning rate of each parameter group using a cosine annealing schedule. - [CyclicLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.CyclicLR.html): Sets the learning rate of each parameter group according to cyclical learning rate policy (CLR). - [ExponentialLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.ExponentialLR.html): Decays the learning rate of each parameter group by gamma every epoch. - [LambdaLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.LambdaLR.html): Sets the initial learning rate. - [LinearLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.LinearLR.html): Decays the learning rate of each parameter group by linearly changing small multiplicative factor. - [LRScheduler](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.LRScheduler.html): Base class for all learning rate schedulers. - [MultiplicativeLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.MultiplicativeLR.html): Multiply the learning rate of each parameter group by the factor given in the specified function. - [MultiStepLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.MultiStepLR.html): Decays the learning rate of each parameter group by gamma once the number of epoch reaches one of the milestones. - [OneCycleLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.OneCycleLR.html): Sets the learning rate of each parameter group according to the 1cycle learning rate policy. - [PolynomialLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.PolynomialLR.html): Decays the learning rate of each parameter group using a polynomial function in the given total_iters. - [ReduceLROnPlateau](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.ReduceLROnPlateau.html): Reduce learning rate when a metric has stopped improving. - [SequentialLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.SequentialLR.html): Contains a list of schedulers expected to be called sequentially during the optimization process. - [StepLR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.lr_scheduler.StepLR.html): Decays the learning rate of each parameter group by gamma every step_size epochs. - [Muon](https://www.tensorplay.cn/docs/generated/tensorplay.optim.Muon.html): Implements Muon algorithm. - [NAdam](https://www.tensorplay.cn/docs/generated/tensorplay.optim.nadam.NAdam.html): - [Optimizer](https://www.tensorplay.cn/docs/generated/tensorplay.optim.optimizer.Optimizer.html): Base class for optimizers. - [tensorplay.optim.optimizer.register_optimizer_step_post_hook](https://www.tensorplay.cn/docs/generated/tensorplay.optim.optimizer.register_optimizer_step_post_hook.html): - [tensorplay.optim.optimizer.register_optimizer_step_pre_hook](https://www.tensorplay.cn/docs/generated/tensorplay.optim.optimizer.register_optimizer_step_pre_hook.html): - [RAdam](https://www.tensorplay.cn/docs/generated/tensorplay.optim.radam.RAdam.html): - [RMSprop](https://www.tensorplay.cn/docs/generated/tensorplay.optim.rmsprop.RMSprop.html): RMSprop optimizer matching Torch’s centered and momentum variants. - [Rprop](https://www.tensorplay.cn/docs/generated/tensorplay.optim.rprop.Rprop.html): Resilient backpropagation optimizer. - [SGD](https://www.tensorplay.cn/docs/generated/tensorplay.optim.sgd.SGD.html): - [SparseAdam](https://www.tensorplay.cn/docs/generated/tensorplay.optim.sparse_adam.SparseAdam.html): SparseAdam implements a masked version of the Adam algorithm suitable for sparse gradients. Currently, due to implementation constraints (explained below), SparseAdam is only intended for a narrow subset of use cases, sp - [AveragedModel](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.AveragedModel.html): A model that maintains a running SWA or EMA copy of another model. - [tensorplay.optim.swa_utils.get_ema_avg_fn](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.get_ema_avg_fn.html): - [tensorplay.optim.swa_utils.get_ema_multi_avg_fn](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.get_ema_multi_avg_fn.html): - [tensorplay.optim.swa_utils.get_swa_avg_fn](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.get_swa_avg_fn.html): - [tensorplay.optim.swa_utils.get_swa_multi_avg_fn](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.get_swa_multi_avg_fn.html): - [SWALR](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.SWALR.html): Anneal each optimizer learning rate to a fixed SWA learning rate. - [tensorplay.optim.swa_utils.update_bn](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swa_utils.update_bn.html): - [tensorplay.optim.swap_in_optimizer_params_and_state](https://www.tensorplay.cn/docs/generated/tensorplay.optim.swap_in_optimizer_params_and_state.html): Temporarily install replacement parameters and packed optimizer state. - [tensorplay.pixel_shuffle](https://www.tensorplay.cn/docs/generated/tensorplay.pixel_shuffle.html): - [tensorplay.quantized_linear](https://www.tensorplay.cn/docs/generated/tensorplay.quantized_linear.html): - [tensorplay.random_](https://www.tensorplay.cn/docs/generated/tensorplay.random_.html): - [tensorplay.random.fork_rng](https://www.tensorplay.cn/docs/generated/tensorplay.random.fork_rng.html): Forks the RNG state: code inside the context gets a pristine RNG. - [tensorplay.reflection_pad_nd](https://www.tensorplay.cn/docs/generated/tensorplay.reflection_pad_nd.html): - [tensorplay.relu](https://www.tensorplay.cn/docs/generated/tensorplay.relu.html): - [tensorplay.relu6](https://www.tensorplay.cn/docs/generated/tensorplay.relu6.html): - [tensorplay.repeat](https://www.tensorplay.cn/docs/generated/tensorplay.repeat.html): - [tensorplay.replication_pad_nd](https://www.tensorplay.cn/docs/generated/tensorplay.replication_pad_nd.html): - [tensorplay.resize_](https://www.tensorplay.cn/docs/generated/tensorplay.resize_.html): - [tensorplay.sample](https://www.tensorplay.cn/docs/generated/tensorplay.sample.html): - [Scalar](https://www.tensorplay.cn/docs/generated/tensorplay.Scalar.html): - [tensorplay.scaled_dot_product_attention](https://www.tensorplay.cn/docs/generated/tensorplay.scaled_dot_product_attention.html): - [tensorplay.scaled_modified_bessel_k0](https://www.tensorplay.cn/docs/generated/tensorplay.scaled_modified_bessel_k0.html): - [tensorplay.scaled_modified_bessel_k1](https://www.tensorplay.cn/docs/generated/tensorplay.scaled_modified_bessel_k1.html): - [tensorplay.scatter_](https://www.tensorplay.cn/docs/generated/tensorplay.scatter_.html): - [tensorplay.scatter_add_](https://www.tensorplay.cn/docs/generated/tensorplay.scatter_add_.html): - [tensorplay.seed](https://www.tensorplay.cn/docs/generated/tensorplay.seed.html): - [tensorplay.serialization.load](https://www.tensorplay.cn/docs/generated/tensorplay.serialization.load.html): Load a checkpoint saved by tp.save or torch.save . - [tensorplay.serialization.save](https://www.tensorplay.cn/docs/generated/tensorplay.serialization.save.html): Save obj to disk. - [tensorplay.set_autocast_cache_enabled](https://www.tensorplay.cn/docs/generated/tensorplay.set_autocast_cache_enabled.html): - [tensorplay.set_autocast_dtype](https://www.tensorplay.cn/docs/generated/tensorplay.set_autocast_dtype.html): - [tensorplay.set_autocast_enabled](https://www.tensorplay.cn/docs/generated/tensorplay.set_autocast_enabled.html): - [tensorplay.set_default_device](https://www.tensorplay.cn/docs/generated/tensorplay.set_default_device.html): Sets the default tensorplay.Tensor to be allocated on device . This does not affect factory function calls which are called with an explicit device argument. Factory calls will be performed as if they were passed device - [tensorplay.set_default_dtype](https://www.tensorplay.cn/docs/generated/tensorplay.set_default_dtype.html): Sets the default floating point dtype to d . Supports floating point dtype as inputs. Other dtypes will cause tensorplay to raise an exception. - [tensorplay.set_deterministic_debug_mode](https://www.tensorplay.cn/docs/generated/tensorplay.set_deterministic_debug_mode.html): Sets the debug mode for deterministic operations. - [tensorplay.set_float32_matmul_precision](https://www.tensorplay.cn/docs/generated/tensorplay.set_float32_matmul_precision.html): Sets the internal precision of float32 matrix multiplications. - [tensorplay.set_num_threads](https://www.tensorplay.cn/docs/generated/tensorplay.set_num_threads.html): Sets the number of threads used for intraop parallelism on CPU. - [tensorplay.set_printoptions](https://www.tensorplay.cn/docs/generated/tensorplay.set_printoptions.html): Set print options - [tensorplay.set_rng_state](https://www.tensorplay.cn/docs/generated/tensorplay.set_rng_state.html): - [tensorplay.shifted_chebyshev_polynomial_t](https://www.tensorplay.cn/docs/generated/tensorplay.shifted_chebyshev_polynomial_t.html): - [tensorplay.shifted_chebyshev_polynomial_u](https://www.tensorplay.cn/docs/generated/tensorplay.shifted_chebyshev_polynomial_u.html): - [tensorplay.shifted_chebyshev_polynomial_v](https://www.tensorplay.cn/docs/generated/tensorplay.shifted_chebyshev_polynomial_v.html): - [tensorplay.shifted_chebyshev_polynomial_w](https://www.tensorplay.cn/docs/generated/tensorplay.shifted_chebyshev_polynomial_w.html): - [tensorplay.silu](https://www.tensorplay.cn/docs/generated/tensorplay.silu.html): - [Size](https://www.tensorplay.cn/docs/generated/tensorplay.Size.html): - [tensorplay.slice](https://www.tensorplay.cn/docs/generated/tensorplay.slice.html): - [tensorplay.smooth_l1_loss](https://www.tensorplay.cn/docs/generated/tensorplay.smooth_l1_loss.html): - [tensorplay.soft_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.soft_margin_loss.html): - [tensorplay.softplus](https://www.tensorplay.cn/docs/generated/tensorplay.softplus.html): - [tensorplay.softshrink](https://www.tensorplay.cn/docs/generated/tensorplay.softshrink.html): - [tensorplay.sparse_add](https://www.tensorplay.cn/docs/generated/tensorplay.sparse_add.html): - [tensorplay.sparse_mm](https://www.tensorplay.cn/docs/generated/tensorplay.sparse_mm.html): - [tensorplay.sparse_mul](https://www.tensorplay.cn/docs/generated/tensorplay.sparse_mul.html): - [tensorplay.sparse_sum](https://www.tensorplay.cn/docs/generated/tensorplay.sparse_sum.html): - [tensorplay.sparse.mm](https://www.tensorplay.cn/docs/generated/tensorplay.sparse.mm.html): Performs a matrix multiplication of a 2-D sparse COO/CSR tensor with a dense matrix. Equivalent to torch.sparse.mm . - [tensorplay.sparse.spdiags](https://www.tensorplay.cn/docs/generated/tensorplay.sparse.spdiags.html): Constructs a sparse tensor from diagonals, mirroring torch.sparse.spdiags (and thereby scipy.sparse.spdiags ). - [tensorplay.sparse.sum](https://www.tensorplay.cn/docs/generated/tensorplay.sparse.sum.html): Sum of input ’s values over dim . - [tensorplay.spdiags](https://www.tensorplay.cn/docs/generated/tensorplay.spdiags.html): - [tensorplay.special.entr](https://www.tensorplay.cn/docs/generated/tensorplay.special.entr.html): Entropy of a probability element: -x*log(x) (0 at x=0, NaN below). - [tensorplay.special.erfcx](https://www.tensorplay.cn/docs/generated/tensorplay.special.erfcx.html): Scaled complementary error function: exp(x^2) * erfc(x) . - [tensorplay.special.expit](https://www.tensorplay.cn/docs/generated/tensorplay.special.expit.html): Numerically-stable sigmoid; identical to sigmoid() . - [tensorplay.special.gammaln](https://www.tensorplay.cn/docs/generated/tensorplay.special.gammaln.html): Natural log of the absolute value of the gamma function (native lgamma). - [tensorplay.special.log_ndtr](https://www.tensorplay.cn/docs/generated/tensorplay.special.log_ndtr.html): log of the standard normal CDF, stable in the left tail. - [tensorplay.special.log_softmax](https://www.tensorplay.cn/docs/generated/tensorplay.special.log_softmax.html): - [tensorplay.special.logsumexp](https://www.tensorplay.cn/docs/generated/tensorplay.special.logsumexp.html): Log-sum-exp along dim , computed with the max-shift trick. - [tensorplay.special.modified_bessel_i0](https://www.tensorplay.cn/docs/generated/tensorplay.special.modified_bessel_i0.html): Modified Bessel function of the first kind, order 0; alias of i0() . - [tensorplay.special.multigammaln](https://www.tensorplay.cn/docs/generated/tensorplay.special.multigammaln.html): Multivariate log-gamma with dimension p (p >= 2). - [tensorplay.special.ndtr](https://www.tensorplay.cn/docs/generated/tensorplay.special.ndtr.html): Standard normal CDF: Phi(x) = 0.5 * erfc(-x / sqrt(2)) . - [tensorplay.special.ndtri](https://www.tensorplay.cn/docs/generated/tensorplay.special.ndtri.html): Inverse standard normal CDF: sqrt(2) * erfinv(2x - 1) . - [tensorplay.special.polygamma](https://www.tensorplay.cn/docs/generated/tensorplay.special.polygamma.html): Polygamma of order :attr:n: \(\psi^{(n)}(x)\) (native kernel). - [tensorplay.special.psi](https://www.tensorplay.cn/docs/generated/tensorplay.special.psi.html): Digamma function; alias of digamma() . - [tensorplay.special.round](https://www.tensorplay.cn/docs/generated/tensorplay.special.round.html): Rounds to nearest even integer (native Tensor.round ). - [tensorplay.special.softmax](https://www.tensorplay.cn/docs/generated/tensorplay.special.softmax.html): - [tensorplay.special.xlog1py](https://www.tensorplay.cn/docs/generated/tensorplay.special.xlog1py.html): x*log1p(y) with the convention x*log1p(-1) = 0 when x == 0. - [tensorplay.special.xlogy](https://www.tensorplay.cn/docs/generated/tensorplay.special.xlogy.html): x*log(y) with the convention 0*log(anything) = 0 . - [tensorplay.spherical_bessel_j0](https://www.tensorplay.cn/docs/generated/tensorplay.spherical_bessel_j0.html): - [tensorplay.split_with_sizes](https://www.tensorplay.cn/docs/generated/tensorplay.split_with_sizes.html): - [tensorplay.stax.is_available](https://www.tensorplay.cn/docs/generated/tensorplay.stax.is_available.html): Return whether the native Stax extension is loaded. - [tensorplay.stax.stax](https://www.tensorplay.cn/docs/generated/tensorplay.stax.stax.html): Compile one canonical graph and return an executable callable. - [tensorplay.sub_](https://www.tensorplay.cn/docs/generated/tensorplay.sub_.html): - [tensorplay.tensor](https://www.tensorplay.cn/docs/generated/tensorplay.tensor.html): - [Tensor](https://www.tensorplay.cn/docs/generated/tensorplay.Tensor.html): alias of TensorBase - [tensorplay.to_dense](https://www.tensorplay.cn/docs/generated/tensorplay.to_dense.html): - [tensorplay.to_sparse_csr](https://www.tensorplay.cn/docs/generated/tensorplay.to_sparse_csr.html): - [tensorplay.to_sparse](https://www.tensorplay.cn/docs/generated/tensorplay.to_sparse.html): - [tensorplay.tp_binary_cross_entropy](https://www.tensorplay.cn/docs/generated/tensorplay.tp_binary_cross_entropy.html): - [tensorplay.tp_cosine_embedding_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_cosine_embedding_loss.html): - [tensorplay.tp_hinge_embedding_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_hinge_embedding_loss.html): - [tensorplay.tp_huber_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_huber_loss.html): - [tensorplay.tp_kl_div](https://www.tensorplay.cn/docs/generated/tensorplay.tp_kl_div.html): - [tensorplay.tp_l1_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_l1_loss.html): - [tensorplay.tp_margin_ranking_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_margin_ranking_loss.html): - [tensorplay.tp_poisson_nll_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_poisson_nll_loss.html): - [tensorplay.tp_smooth_l1_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_smooth_l1_loss.html): - [tensorplay.tp_soft_margin_loss](https://www.tensorplay.cn/docs/generated/tensorplay.tp_soft_margin_loss.html): - [tensorplay.typename](https://www.tensorplay.cn/docs/generated/tensorplay.typename.html): String representation of the type of an object. - [tensorplay.unfold](https://www.tensorplay.cn/docs/generated/tensorplay.unfold.html): - [tensorplay.uniform_](https://www.tensorplay.cn/docs/generated/tensorplay.uniform_.html): - [tensorplay.unsafe_chunk](https://www.tensorplay.cn/docs/generated/tensorplay.unsafe_chunk.html): - [tensorplay.unsafe_split](https://www.tensorplay.cn/docs/generated/tensorplay.unsafe_split.html): - [tensorplay.upsample_bicubic2d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_bicubic2d.html): - [tensorplay.upsample_bilinear2d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_bilinear2d.html): - [tensorplay.upsample_linear1d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_linear1d.html): - [tensorplay.upsample_nearest1d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_nearest1d.html): - [tensorplay.upsample_nearest2d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_nearest2d.html): - [tensorplay.upsample_nearest3d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_nearest3d.html): - [tensorplay.upsample_trilinear3d](https://www.tensorplay.cn/docs/generated/tensorplay.upsample_trilinear3d.html): - [tensorplay.use_deterministic_algorithms](https://www.tensorplay.cn/docs/generated/tensorplay.use_deterministic_algorithms.html): Sets whether TensorPlay operations must use “deterministic” algorithms. That is, algorithms which, given the same input, and when run on the same software and hardware, always produce the same output. When enabled, opera - [tensorplay.utils.checkpoint.checkpoint_sequential](https://www.tensorplay.cn/docs/generated/tensorplay.utils.checkpoint.checkpoint_sequential.html): torch.utils.checkpoint.checkpoint_sequential compatibility. - [tensorplay.utils.checkpoint.checkpoint](https://www.tensorplay.cn/docs/generated/tensorplay.utils.checkpoint.checkpoint.html): Runs function(*args, **kwargs) eagerly (no recomputation). - [CheckpointPolicy](https://www.tensorplay.cn/docs/generated/tensorplay.utils.checkpoint.CheckpointPolicy.html): - [tensorplay.utils.checkpoint.set_checkpoint_early_stop](https://www.tensorplay.cn/docs/generated/tensorplay.utils.checkpoint.set_checkpoint_early_stop.html): No-op for API parity. - [BatchSampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.BatchSampler.html): Wraps another sampler to yield a mini-batch of indices. - [ChainDataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.ChainDataset.html): Dataset for chaining multiple IterableDataset s. - [ConcatDataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.ConcatDataset.html): Dataset as a concatenation of multiple datasets. - [DataLoader](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.DataLoader.html): Data loader combines a dataset and a sampler, and provides an iterable over the given dataset. - [Dataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.Dataset.html): An abstract class representing a Dataset . - [tensorplay.utils.data.default_collate](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.default_collate.html): Take in a batch of data and put the elements within the batch into a tensor with an additional outer dimension - batch size. - [tensorplay.utils.data.default_convert](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.default_convert.html): Convert each NumPy array element into a tensorplay.Tensor . - [tensorplay.utils.data.get_worker_info](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.get_worker_info.html): Returns the information about the current DataLoader iterator worker process. When called in a worker process, returns a WorkerInfo object with information about that worker process; otherwise returns None . - [IterableDataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.IterableDataset.html): An iterable Dataset. - [RandomSampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.RandomSampler.html): Samples elements randomly. If without replacement, then sample from a shuffled dataset. If with replacement, then user can specify num_samples to draw. - [Sampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.Sampler.html): Base class for all Samplers. - [SequentialSampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.SequentialSampler.html): Samples elements sequentially, always in the same order. - [StackDataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.StackDataset.html): Dataset as a stacking of multiple datasets. - [Subset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.Subset.html): Subset of a dataset at specified indices. - [SubsetRandomSampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.SubsetRandomSampler.html): Samples elements randomly from a given list of indices, without replacement. - [TensorDataset](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.TensorDataset.html): Dataset wrapping tensors. - [WeightedRandomSampler](https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.WeightedRandomSampler.html): Samples elements from [0,..,len(weights)-1] with given probabilities (weights). - [tensorplay.view](https://www.tensorplay.cn/docs/generated/tensorplay.view.html): - [tensorplay.zeta](https://www.tensorplay.cn/docs/generated/tensorplay.zeta.html): - [tensorplay.hub](https://www.tensorplay.cn/docs/hub.html): tensorplay.hub.load - [tensorplay.library](https://www.tensorplay.cn/docs/library.html): tensorplay.library.custom_op - [tensorplay.linalg](https://www.tensorplay.cn/docs/linalg.html): tensorplay.linalg.norm - [Multiprocessing package - tensorplay.multiprocessing](https://www.tensorplay.cn/docs/multiprocessing.html): tensorplay.multiprocessing.reduce_tensor - [tensorplay.nn.functional](https://www.tensorplay.cn/docs/nn.functional.html): tensorplay.nn.functional.conv1d - [tensorplay.nn](https://www.tensorplay.cn/docs/nn.html): tensorplay.nn.modules.module.Module - [tensorplay.nn.init](https://www.tensorplay.cn/docs/nn.init.html): tensorplay.nn.init.calculate_gain - [tensorplay.optim](https://www.tensorplay.cn/docs/optim.html): tensorplay.optim.optimizer.Optimizer - [Quantization](https://www.tensorplay.cn/docs/quantization.html): - [tensorplay.random](https://www.tensorplay.cn/docs/random.html): tensorplay.manual_seed - [tensorplay.sparse](https://www.tensorplay.cn/docs/sparse.html): tensorplay.to_sparse - [tensorplay.special](https://www.tensorplay.cn/docs/special.html): tensorplay.functional.airy_ai - [tensorplay.stax](https://www.tensorplay.cn/docs/stax.html): Static-graph optimization and acceleration. stax traces eager execution into a static graph, applies compiler passes (constant folding, dead code elimination, operator decomposition), and lowers the result to the availab - [tensorplay](https://www.tensorplay.cn/docs/tensorplay.html): tensorplay.is_tensor - [Upstream anchor labels](https://www.tensorplay.cn/docs/upstream_labels.html): Reference pages keep torch docstrings verbatim, and some of them link to anchors that upstream defines in narrative sections this repo does not carry (see docs/README.md, “Deviations”). The labels below satisfy those lin - [tensorplay.vision](https://www.tensorplay.cn/docs/vision.html): tensorplay.vision is the computer-vision toolkit of TensorPlay, mirroring the torchvision package layout. The listing below is a static overview; the package requires optional dependencies (Pillow) for some entry points,