Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
absacosacoshAdaptivePool1dShapeAdaptivePool2dShapeaddaddbmmAddbmmOptionsaddcdivAddcdivOptionsaddcmulAddcmulOptionsaddmmAddmmOptionsaddmvAddmvOptionsaddrAddrOptionsadjointallallcloseAllcloseOptionsAlphaBetaOptionsamaxaminaminmaxAminmaxOptionsangleanyapplyOutarangeare_deterministic_algorithms_enabledargmaxargminargsortargwhereas_stridedas_tensorasinasinhAssertNoShapeErrorAssertNotErrorAsStridedOptionsAtat_error_index_out_of_boundsatanatan2atanhatleast_1datleast_2datleast_3dAtShapeautocast_decrement_nestingautocast_increment_nestingautograd_gradient_mismatch_errorautograd_not_registered_errorAutogradConfigAutogradDeviceAutogradDTypeAutogradEntryAutogradHandleAutogradHandleImplAxesRecordBackwardFnbaddbmmBaddbmmOptionsbartlett_windowBaseKernelConfigbatch_dimensions_do_not_match_errorbernoulliBernoulliOptionsBinaryBackwardFnBinaryBroadcastResultBinaryDTypeBinaryKernelConfigCPUBinaryKernelCPUBinaryOpConfigBinaryOpNamesBinaryOpSchemaBinaryOptionsbincountBincountOptionsbitwise_andbitwise_left_shiftbitwise_notbitwise_orbitwise_right_shiftbitwise_xorblackman_windowblock_diagbmmBooleanDTypeRulebroadcast_error_incompatible_dimensionsbroadcast_shapesbroadcast_tensorsbroadcast_toBroadcastShapeBroadcastShapeRulebroadcastShapesbucketizeBucketizeOptionsBufferUsagebuildEinopsErrorbuildErrorMessagecanBroadcastTocartesian_prodcatCatOptionsCatShapeCauchyOptionscdistCdistOptionsceilceluCeluFunctionalOptionschain_matmulCheckShapeErrorCholeskyShapechunkchunk_error_dim_out_of_rangeChunkOptionsclampClampOptionsclear_autocast_cacheclearEinopsCacheclearEinsumCacheclonecolumn_stackcombinationsCombinationsOptionscompiled_with_cxx11_abicomplexconjconj_physicalcontiguousConv1dShapeConv2dShapeConv3dShapeConvTranspose2dShapecopysigncorrcoefcoscoshcount_nonzeroCountNonzeroOptionscovcoverage_reportcoverageReportCoverageReportCovOptionsCPUForwardFnCPUKernelConfigCPUKernelEntryCPUOnlyResultCPUTensorDatacreateCumExtremeResultcreateTorchCreationOpSchemaCumExtremeResultcummaxcummincumprodCumShapecumsumcumulative_trapezoidCumulativeOptionsCumulativeOptionsWithDimdeg2raddetachDeterministicOptionsDetShapeDevicedevice_error_requiresDeviceBufferDeviceCapabilitiesDeviceCheckedResultDeviceConfigDeviceContextDeviceEntryDeviceHandleDeviceInputDeviceOptionsDeviceRegistryDeviceTypediagdiag_embedDiagEmbedOptionsdiagflatDiagflatOptionsDiagFlatOptionsdiagonal_scatterDiagonalOptionsDiagonalScatterOptionsDiagOptionsDiagShapediffDiffOptionsdigammadimension_error_out_of_rangeDispatchConfigdistDistOptionsdivdotDotShapeRuleDoubleDoubleDimdropoutDropoutFunctionalOptionsdsplitdstackDTypedtype_already_registered_errordtype_components_mismatch_errordtype_not_found_errorDTypeComponentsDTypeConfigDTypeCoverageReportDTypeDisplayConfigDTypeEntryDTypeHandleDTypeHandleImplDTypeInfoDTypeRegistryDTypeRuleDTypeSerializationConfigDynamicShapeEigShapeeinops_error_ambiguous_decompositioneinops_error_anonymous_in_outputeinops_error_dimension_mismatcheinops_error_invalid_patterneinops_error_reduce_undefined_outputeinops_error_repeat_missing_sizeeinops_error_undefined_axiseinsumeinsum_error_dimension_mismatcheinsum_error_index_out_of_rangeeinsum_error_invalid_equationeinsum_error_invalid_sublist_elementeinsum_error_operand_count_mismatcheinsum_error_subscript_rank_mismatcheinsum_error_unknown_output_indexEinsumOptionsEinsumOutputShapeEllipsiseluelu_EluFunctionalOptionsembedding_bag_error_requires_2d_inputemptyempty_cacheempty_likeeqequalerferfcerfinvexpexp2expandexpand_asexpand_error_incompatibleExpandShapeexpm1ExponentialOptionseyeEyeOptionsfftFFTOptionsfindKernelWithPredicatefindSimilarPatternsflattenFlattenOptionsFlattenShapeflipflip_error_dim_out_of_rangefliplrFlipShapeflipudfloat_powerFloatDTypeRulefloorfloor_dividefmaxfminfmodformatEquationErrorformatShapefracfrexpfrombufferfullfull_likefunction_already_registered_errorFunctionConfigFunctionEntryFunctionHandlegathergather_error_dim_out_of_rangeGatherShapegcdgegeluGeometricOptionsget_autocast_cpu_dtypeget_autocast_gpu_dtypeget_autocast_ipu_dtypeget_autocast_xla_dtypeget_default_deviceget_default_dtypeget_deterministic_debug_modeget_device_configget_device_contextget_device_moduleget_dtype_infoget_file_pathget_float32_matmul_precisionget_num_interop_threadsget_num_threadsget_op_infoget_printoptionsget_real_dtypeget_rng_stategetAutogradgetDTypegetEinopsCacheSizegetEinsumCacheSizegetFunctiongetKernelgetMethodgetOpInfoGetOpKindGetOpSchemagetScalarKernelgluGluFunctionalOptionsGradContextGradFnGradientsForgtHalfHalfDimhamming_windowhann_windowhardshrinkhardsigmoidhardswishhardtanhhardtanh_HardtanhFunctionalOptionshas_autogradhas_devicehas_dtypehas_kernelhasAutogradhasDTypehasFunctionhasKernelhasMethodhasScalarKernelHasShapeErrorheavisidehistcHistcOptionshistogramHistogramOptionsHistogramResulthsplithstackhypoti0IdentityShapeifftimagindex_addindex_copyindex_fillindex_putindex_reduceindex_selectindex_select_error_dim_out_of_rangeIndexPutOptionsIndexSelectShapeIndexSpecIndicesOptionsIndicesSpecinitialize_deviceInputsForInsertDiminvalid_config_errorinverseInverseShapeirfftis_anomaly_check_nan_enabledis_anomaly_enabledis_autocast_cache_enabledis_autocast_cpu_enabledis_autocast_ipu_enabledis_autocast_xla_enabledis_complexis_complex_dtypeis_cpu_only_modeis_deterministic_algorithms_warn_only_enabledis_floating_pointis_floating_point_dtypeis_inference_mode_enabledis_nonzerois_tensoris_warn_always_enabledis_webgpu_availableIs2DIsAtLeast1DIsBinaryOpIsBinaryOpNameiscloseIscloseOptionsisfiniteisinisinfisnanisneginfisposinfisrealIsReductionOpIsReductionOpNameIsRegistryErrorIsShapeErroristftISTFTOptionsIsUnaryOpIsUnaryOpNameitem_error_not_scalarItemResultkaiser_windowKaiserWindowOptionskernel_not_registered_errorkernel_signature_mismatch_errorKernelConfigKernelConfigWebGPUKernelEntryKernelHandleKernelInfoKernelPredicateKernelRegistryKernelWebGPUkronkthvalueKthvalueOptionslcmldexpleleaky_reluleaky_relu_LeakyReluFunctionalOptionslerplevenshteinDistancelgammalinalg_error_not_square_matrixlinalg_error_requires_2dlinalg_error_requires_at_least_2dlinearlinspacelist_custom_deviceslist_custom_dtypeslist_deviceslist_dtypeslist_functionslist_kernelslist_methodslist_opslistCustomDTypeslistDTypeslistFunctionslistKernelsListKernelsOptionslistMethodslistOpsListOpsOptionsloglog_softmaxlog10log1plog2logaddexplogaddexp2logcumsumexplogical_andlogical_notlogical_orlogical_xorLogitOptionsLogNormalOptionsLogOptionslogsigmoidlogspacelogsumexpLogsumexpOptionsltLUShapeLuSolveOptionsmasked_fillmasked_selectmasked_select_asyncMaskSpecmatmulmatmul_error_inner_dimensions_do_not_matchMatmul2DShapeMatmulShapeMatmulShapeRuleMatrixTransposeShapemaxmaximummeanmedianmemory_statsmemory_summarymeshgridmethod_already_registered_errormethod_dtype_not_supported_errorMethodConfigMethodEntryMethodHandleminminimummishmmMMShapeRulemodemovedimmsortmulmultinomialmultinomial_asyncMultinomialAsyncOptionsMultinomialOptionsMultiplyBymvMVShapeRulenan_to_numnanmeannanmediannanquantileNanReductionOptionsnansumNanToNumOptionsnarrownarrow_copynarrow_error_length_exceeds_boundsnarrow_error_start_out_of_boundsNarrowShapeneneedsBroadcastnegNegativeDimnextafternonzeroNonzeroOptionsnormnormalNormalOptionsNormOptionsnumelonesones_likeop_kind_mismatch_errorop_not_found_errorOpCoverageEntryOpInfoOpKindOpNameOpSchemaOpSchemasouterOuterShapepackPackShapepermutepermute_error_dimension_count_mismatchPermuteShapepoissonpolarPool1dShapePool2dShapePool3dShapepositivepowpreluPrintOptionsprodprofiler_allow_cudagraph_cupti_lazy_reinit_cuda12promote_typesPromoteDTypeRulePutOptionsquantileQuantileOptionsrad2degrandrand_likerandintrandint_likeRandintLikeOptionsRandintOptionsrandnrandn_likeRandomLikeOptionsRandomOptionsrandpermRangeSpecRankravelrealrearrangeRearrangeOptionsRearrangeShapereciprocalreduceReduceOperationReduceOptionsReduceShapeReductionKernelConfigCPUReductionKernelCPUReductionOpNamesReductionOpSchemaReductionOptionsReductionShapeRuleregister_backwardregister_deviceregister_dtyperegister_forwardregister_functionregister_methodregister_scalar_forwardregisterAutogradRegisterBackwardOptionsregisterBinaryOpregisterDTypeRegisterDTypeOptionsRegisteredDTyperegisterFunctionRegisterFunctionOptionsregisterKernelRegisterKernelOptionsregisterMethodRegisterMethodOptionsregisterScalarKernelregisterUnaryOpregistration_failed_errorrelurelu_relu6ReluFunctionalOptionsremainderRemoveDimrepeatrepeat_interleaveRepeatInterleaveOptionsRepeatOptionsRepeatShapeReplaceDimrequireWebGPUreset_peak_memory_statsreshapeReshapeShaperesult_typerfftrollRollOptionsrot90Rot90Optionsroundrrelurrelu_RreluFunctionalOptionsrsqrtSafeExpandShapeSameDTypeRuleSameShapeRuleSaveForBackwardScalarCPUForwardFnScalarCPUKernelConfigScalarKernelEntryScalarKernelHandleScalarWebGPUKernelConfigScaleDimscatterscatter_addscatter_add_scatter_error_dim_out_of_rangescatter_reducescatter_reduce_ScatterReduceOptionsScatterShapesearchsortedSearchSortedOptionsselectselect_error_index_out_of_boundsselect_scatterSelectShapeseluset_default_deviceset_default_tensor_typeset_deterministic_debug_modeset_float32_matmul_precisionset_printoptionsset_warn_alwaysSetupContextFnShapeShapeCheckedResultShapedTensorShapeErrorMessageShapeOpSchemaShapeRulesigmoidsignsignbitsilusinsincsinhSizeOptionsslice_error_out_of_boundsslice_scatterSliceOptionsSliceScatterOptionsSliceShapeSliceSpecsoftmaxsoftmax_error_dim_out_of_rangeSoftmaxShapesoftminSoftminFunctionalOptionssoftplusSoftplusFunctionalOptionssoftshrinksoftsignsortSortOptionssplitsplit_error_dim_out_of_rangeSplitOptionssqrtsquaresqueezeSqueezeOptionsSqueezeShapestackStackOptionsStackShapestdstd_meanStdVarMeanOptionsStdVarOptionsstftSTFTOptionsStrideOptionssubSublistSublistElementSubscriptIndexsumSVDShapeswapaxessym_floatsym_intsym_notttaketake_along_dimTakeAlongDimOptionstantanhtanhshrinktensortensor_splitTensorCreatorTensorDatatensordotTensordotOptionsTensorLikeTensorMetaTensorOptionsTensorStoragethresholdthreshold_tileTileShapeToOptionstopkTopkOptionsTorchtraceTraceShapetransposetranspose_dims_error_out_of_rangetranspose_error_requires_2d_tensorTransposeDimsShapeTransposeDimsShapeCheckedTransposeShapetrapezoidTrapezoidOptionsTriangularOptionstriltril_indicesTriOptionsTripletriutriu_indicestrue_dividetruncTupleOfLengthTypedArrayTypedArrayForTypedStorageTypeOptionsUnaryBackwardFnUnaryDTypeUnaryKernelConfigCPUUnaryKernelCPUUnaryOpConfigUnaryOpFnUnaryOpNamesUnaryOpParamsUnaryOpSchemaUnaryOptionsunbindunbind_error_dim_out_of_rangeUnbindOptionsunflattenUniformOptionsuniqueunique_consecutiveUniqueConsecutiveOptionsUniqueOptionsunpackUnpackShapeunravel_indexunregister_deviceunsqueezeUnsqueezeOptionsUnsqueezeShapeuse_deterministic_algorithmsValidateBatchedSquareMatrixValidateChunkDimValidatedEinsumShapevalidateDeviceValidateDeviceValidatedRearrangeShapeValidatedReduceShapeValidatedRepeatShapevalidateDTypeValidateEinsumValidateOperandCountValidateRanksValidateScalarValidateSplitDimValidateSquareMatrixValidateUnbindDimValueOptionsvar_var_meanvdotviewview_as_complexview_as_realvmapvsplitvstackWebGPUKernelConfigWebGPUOnlyResultWebGPUTensorDatawhereWindowOptionsxlogyzeroszeros_like
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. torch.js
  3. torch
  4. OpSchemas

torch.OpSchemas

export interface OpSchemas {
  // ==========================================================================
  // Binary Arithmetic Operations
  // ==========================================================================

  add: BinaryOpSchema<'add', BroadcastShapeRule, 'same'>;
  sub: BinaryOpSchema<'sub', BroadcastShapeRule, 'same'>;
  mul: BinaryOpSchema<'mul', BroadcastShapeRule, 'same'>;
  div: BinaryOpSchema<'div', BroadcastShapeRule, 'same'>;
  pow: BinaryOpSchema<'pow', BroadcastShapeRule, 'float'>;
  float_power: BinaryOpSchema<'float_power', BroadcastShapeRule, 'float'>;
  remainder: BinaryOpSchema<'remainder', BroadcastShapeRule, 'same'>;
  fmod: BinaryOpSchema<'fmod', BroadcastShapeRule, 'float'>;
  floor_divide: BinaryOpSchema<'floor_divide', BroadcastShapeRule, 'same'>;

  // ==========================================================================
  // Binary Min/Max Operations
  // ==========================================================================

  maximum: BinaryOpSchema<'maximum', BroadcastShapeRule, 'same'>;
  minimum: BinaryOpSchema<'minimum', BroadcastShapeRule, 'same'>;
  fmax: BinaryOpSchema<'fmax', BroadcastShapeRule, 'float'>;
  fmin: BinaryOpSchema<'fmin', BroadcastShapeRule, 'float'>;

  // ==========================================================================
  // Binary Trigonometric Operations
  // ==========================================================================

  atan2: BinaryOpSchema<'atan2', BroadcastShapeRule, 'float'>;
  hypot: BinaryOpSchema<'hypot', BroadcastShapeRule, 'float'>;

  // ==========================================================================
  // Binary Special Operations
  // ==========================================================================

  copysign: BinaryOpSchema<'copysign', BroadcastShapeRule, 'float'>;
  logaddexp: BinaryOpSchema<'logaddexp', BroadcastShapeRule, 'float'>;
  logaddexp2: BinaryOpSchema<'logaddexp2', BroadcastShapeRule, 'float'>;
  xlogy: BinaryOpSchema<'xlogy', BroadcastShapeRule, 'float'>;
  ldexp: BinaryOpSchema<'ldexp', BroadcastShapeRule, 'float'>;
  nextafter: BinaryOpSchema<'nextafter', BroadcastShapeRule, 'float'>;

  // ==========================================================================
  // Binary Bitwise Operations
  // ==========================================================================

  bitwise_and: BinaryOpSchema<'bitwise_and', BroadcastShapeRule, 'same'>;
  bitwise_or: BinaryOpSchema<'bitwise_or', BroadcastShapeRule, 'same'>;
  bitwise_xor: BinaryOpSchema<'bitwise_xor', BroadcastShapeRule, 'same'>;
  bitwise_left_shift: BinaryOpSchema<'bitwise_left_shift', BroadcastShapeRule, 'same'>;
  bitwise_right_shift: BinaryOpSchema<'bitwise_right_shift', BroadcastShapeRule, 'same'>;

  // ==========================================================================
  // Binary Logical Operations
  // ==========================================================================

  logical_and: BinaryOpSchema<'logical_and', BroadcastShapeRule, 'boolean'>;
  logical_or: BinaryOpSchema<'logical_or', BroadcastShapeRule, 'boolean'>;
  logical_xor: BinaryOpSchema<'logical_xor', BroadcastShapeRule, 'boolean'>;

  // ==========================================================================
  // Binary Integer Operations
  // ==========================================================================

  gcd: BinaryOpSchema<'gcd', BroadcastShapeRule, 'same'>;
  lcm: BinaryOpSchema<'lcm', BroadcastShapeRule, 'same'>;

  // ==========================================================================
  // Binary Comparison Operations
  // ==========================================================================

  eq: BinaryOpSchema<'eq', BroadcastShapeRule, 'boolean'>;
  ne: BinaryOpSchema<'ne', BroadcastShapeRule, 'boolean'>;
  lt: BinaryOpSchema<'lt', BroadcastShapeRule, 'boolean'>;
  le: BinaryOpSchema<'le', BroadcastShapeRule, 'boolean'>;
  gt: BinaryOpSchema<'gt', BroadcastShapeRule, 'boolean'>;
  ge: BinaryOpSchema<'ge', BroadcastShapeRule, 'boolean'>;

  // ==========================================================================
  // Matrix Multiplication Operations
  // ==========================================================================

  matmul: BinaryOpSchema<'matmul', MatmulShapeRule, 'same'>;
  mm: BinaryOpSchema<'mm', MMShapeRule, 'same'>;
  bmm: BinaryOpSchema<'bmm', MatmulShapeRule, 'same'>;
  dot: BinaryOpSchema<'dot', 'dot', 'same'>;
  mv: BinaryOpSchema<'mv', 'mv', 'same'>;

  // ==========================================================================
  // Unary Basic Operations
  // ==========================================================================

  neg: UnaryOpSchema<'neg', IdentityShape, 'same'>;
  abs: UnaryOpSchema<'abs', IdentityShape, 'same'>;
  sign: UnaryOpSchema<'sign', IdentityShape, 'same'>;
  positive: UnaryOpSchema<'positive', IdentityShape, 'same'>;
  square: UnaryOpSchema<'square', IdentityShape, 'same'>;
  reciprocal: UnaryOpSchema<'reciprocal', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Rounding Operations
  // ==========================================================================

  ceil: UnaryOpSchema<'ceil', IdentityShape, 'float'>;
  floor: UnaryOpSchema<'floor', IdentityShape, 'float'>;
  round: UnaryOpSchema<'round', IdentityShape, 'float'>;
  trunc: UnaryOpSchema<'trunc', IdentityShape, 'float'>;
  frac: UnaryOpSchema<'frac', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Exponential and Logarithmic Operations
  // ==========================================================================

  exp: UnaryOpSchema<'exp', IdentityShape, 'float'>;
  exp2: UnaryOpSchema<'exp2', IdentityShape, 'float'>;
  expm1: UnaryOpSchema<'expm1', IdentityShape, 'float'>;
  log: UnaryOpSchema<'log', IdentityShape, 'float'>;
  log2: UnaryOpSchema<'log2', IdentityShape, 'float'>;
  log10: UnaryOpSchema<'log10', IdentityShape, 'float'>;
  log1p: UnaryOpSchema<'log1p', IdentityShape, 'float'>;
  sqrt: UnaryOpSchema<'sqrt', IdentityShape, 'float'>;
  rsqrt: UnaryOpSchema<'rsqrt', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Trigonometric Operations
  // ==========================================================================

  sin: UnaryOpSchema<'sin', IdentityShape, 'float'>;
  cos: UnaryOpSchema<'cos', IdentityShape, 'float'>;
  tan: UnaryOpSchema<'tan', IdentityShape, 'float'>;
  asin: UnaryOpSchema<'asin', IdentityShape, 'float'>;
  acos: UnaryOpSchema<'acos', IdentityShape, 'float'>;
  atan: UnaryOpSchema<'atan', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Hyperbolic Operations
  // ==========================================================================

  sinh: UnaryOpSchema<'sinh', IdentityShape, 'float'>;
  cosh: UnaryOpSchema<'cosh', IdentityShape, 'float'>;
  asinh: UnaryOpSchema<'asinh', IdentityShape, 'float'>;
  acosh: UnaryOpSchema<'acosh', IdentityShape, 'float'>;
  atanh: UnaryOpSchema<'atanh', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Activation Functions
  // ==========================================================================

  relu: UnaryOpSchema<'relu', IdentityShape, 'same'>;
  prelu: BinaryOpSchema<'prelu', BroadcastShapeRule, 'same'>;
  elu: UnaryOpSchema<'elu', IdentityShape, 'float'>;
  celu: UnaryOpSchema<'celu', IdentityShape, 'float'>;
  selu: UnaryOpSchema<'selu', IdentityShape, 'float'>;
  leaky_relu: UnaryOpSchema<'leaky_relu', IdentityShape, 'float'>;
  rrelu: UnaryOpSchema<'rrelu', IdentityShape, 'float'>;
  sigmoid: UnaryOpSchema<'sigmoid', IdentityShape, 'float'>;
  logsigmoid: UnaryOpSchema<'logsigmoid', IdentityShape, 'float'>;
  tanh: UnaryOpSchema<'tanh', IdentityShape, 'float'>;
  gelu: UnaryOpSchema<'gelu', IdentityShape, 'float'>;
  glu: UnaryOpSchema<'glu', IdentityShape, 'same'>;
  silu: UnaryOpSchema<'silu', IdentityShape, 'float'>;
  mish: UnaryOpSchema<'mish', IdentityShape, 'float'>;
  hardsigmoid: UnaryOpSchema<'hardsigmoid', IdentityShape, 'float'>;
  hardswish: UnaryOpSchema<'hardswish', IdentityShape, 'float'>;
  hardtanh: UnaryOpSchema<'hardtanh', IdentityShape, 'float'>;
  hardshrink: UnaryOpSchema<'hardshrink', IdentityShape, 'float'>;
  softshrink: UnaryOpSchema<'softshrink', IdentityShape, 'float'>;
  softmin: UnaryOpSchema<'softmin', IdentityShape, 'float'>;
  softplus: UnaryOpSchema<'softplus', IdentityShape, 'float'>;
  softsign: UnaryOpSchema<'softsign', IdentityShape, 'float'>;
  tanhshrink: UnaryOpSchema<'tanhshrink', IdentityShape, 'float'>;
  relu6: UnaryOpSchema<'relu6', IdentityShape, 'same'>;
  threshold: UnaryOpSchema<'threshold', IdentityShape, 'same'>;
  erf: UnaryOpSchema<'erf', IdentityShape, 'float'>;
  erfc: UnaryOpSchema<'erfc', IdentityShape, 'float'>;
  erfinv: UnaryOpSchema<'erfinv', IdentityShape, 'float'>;
  lgamma: UnaryOpSchema<'lgamma', IdentityShape, 'float'>;
  digamma: UnaryOpSchema<'digamma', IdentityShape, 'float'>;
  i0: UnaryOpSchema<'i0', IdentityShape, 'float'>;
  logit: UnaryOpSchema<'logit', IdentityShape, 'float'>;
  sinc: UnaryOpSchema<'sinc', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Conversion Operations
  // ==========================================================================

  deg2rad: UnaryOpSchema<'deg2rad', IdentityShape, 'float'>;
  rad2deg: UnaryOpSchema<'rad2deg', IdentityShape, 'float'>;

  // ==========================================================================
  // Unary Bitwise Operations
  // ==========================================================================

  bitwise_not: UnaryOpSchema<'bitwise_not', IdentityShape, 'same'>;

  // ==========================================================================
  // Unary Logical Operations
  // ==========================================================================

  logical_not: UnaryOpSchema<'logical_not', IdentityShape, 'boolean'>;

  // ==========================================================================
  // Unary Type Checking Operations
  // ==========================================================================

  isnan: UnaryOpSchema<'isnan', IdentityShape, 'boolean'>;
  isinf: UnaryOpSchema<'isinf', IdentityShape, 'boolean'>;
  isfinite: UnaryOpSchema<'isfinite', IdentityShape, 'boolean'>;
  isposinf: UnaryOpSchema<'isposinf', IdentityShape, 'boolean'>;
  isneginf: UnaryOpSchema<'isneginf', IdentityShape, 'boolean'>;
  signbit: UnaryOpSchema<'signbit', IdentityShape, 'boolean'>;
  isreal: UnaryOpSchema<'isreal', IdentityShape, 'boolean'>;

  // ==========================================================================
  // Reduction Operations
  // ==========================================================================

  sum: ReductionOpSchema<'sum', 'same'>;
  prod: ReductionOpSchema<'prod', 'same'>;
  mean: ReductionOpSchema<'mean', 'float'>;
  std: ReductionOpSchema<'std', 'float'>;
  var: ReductionOpSchema<'var', 'float'>;
  max: ReductionOpSchema<'max', 'same'>;
  min: ReductionOpSchema<'min', 'same'>;
  amax: ReductionOpSchema<'amax', 'same'>;
  amin: ReductionOpSchema<'amin', 'same'>;
  argmax: ReductionOpSchema<'argmax', 'same'>;
  argmin: ReductionOpSchema<'argmin', 'same'>;
  any: ReductionOpSchema<'any', 'boolean'>;
  all: ReductionOpSchema<'all', 'boolean'>;
  logsumexp: ReductionOpSchema<'logsumexp', 'float'>;
  norm: ReductionOpSchema<'norm', 'float'>;

  // ==========================================================================
  // Creation Operations
  // ==========================================================================

  zeros: CreationOpSchema<'zeros'>;
  ones: CreationOpSchema<'ones'>;
  empty: CreationOpSchema<'empty'>;
  full: CreationOpSchema<'full'>;
  arange: CreationOpSchema<'arange'>;
  linspace: CreationOpSchema<'linspace'>;
  logspace: CreationOpSchema<'logspace'>;
  eye: CreationOpSchema<'eye'>;
  rand: CreationOpSchema<'rand'>;
  randn: CreationOpSchema<'randn'>;
  randint: CreationOpSchema<'randint'>;

  // ==========================================================================
  // Shape Operations
  // ==========================================================================

  reshape: ShapeOpSchema<'reshape'>;
  view: ShapeOpSchema<'view'>;
  transpose: ShapeOpSchema<'transpose'>;
  permute: ShapeOpSchema<'permute'>;
  squeeze: ShapeOpSchema<'squeeze'>;
  unsqueeze: ShapeOpSchema<'unsqueeze'>;
  flatten: ShapeOpSchema<'flatten'>;
  expand: ShapeOpSchema<'expand'>;
  contiguous: ShapeOpSchema<'contiguous'>;
  clone: ShapeOpSchema<'clone'>;
  t: ShapeOpSchema<'t'>;
  masked_fill: ShapeOpSchema<'masked_fill'>;

  // ==========================================================================
  // torch.special.* Namespace Operations
  // ==========================================================================

  'special.expm1': UnaryOpSchema<'special.expm1', IdentityShape, 'float'>;
  'special.exp2': UnaryOpSchema<'special.exp2', IdentityShape, 'float'>;
  'special.log1p': UnaryOpSchema<'special.log1p', IdentityShape, 'float'>;
  'special.xlogy': BinaryOpSchema<'special.xlogy', BroadcastShapeRule, 'float'>;
  'special.erf': UnaryOpSchema<'special.erf', IdentityShape, 'float'>;
  'special.erfc': UnaryOpSchema<'special.erfc', IdentityShape, 'float'>;
  'special.erfinv': UnaryOpSchema<'special.erfinv', IdentityShape, 'float'>;
  'special.i0': UnaryOpSchema<'special.i0', IdentityShape, 'float'>;
  'special.i0e': UnaryOpSchema<'special.i0e', IdentityShape, 'float'>;
  'special.i1': UnaryOpSchema<'special.i1', IdentityShape, 'float'>;
  'special.i1e': UnaryOpSchema<'special.i1e', IdentityShape, 'float'>;
  'special.logit': UnaryOpSchema<'special.logit', IdentityShape, 'float'>;
  'special.expit': UnaryOpSchema<'special.expit', IdentityShape, 'float'>;
  'special.digamma': UnaryOpSchema<'special.digamma', IdentityShape, 'float'>;
  'special.gammaln': UnaryOpSchema<'special.gammaln', IdentityShape, 'float'>;
  'special.entr': UnaryOpSchema<'special.entr', IdentityShape, 'float'>;
  'special.xlog1py': BinaryOpSchema<'special.xlog1py', BroadcastShapeRule, 'float'>;
  'special.zeta': BinaryOpSchema<'special.zeta', BroadcastShapeRule, 'float'>;
  'special.ndtr': UnaryOpSchema<'special.ndtr', IdentityShape, 'float'>;
  'special.ndtri': UnaryOpSchema<'special.ndtri', IdentityShape, 'float'>;
  'special.log_ndtr': UnaryOpSchema<'special.log_ndtr', IdentityShape, 'float'>;
  'special.sinc': UnaryOpSchema<'special.sinc', IdentityShape, 'float'>;
  'special.round': UnaryOpSchema<'special.round', IdentityShape, 'float'>;

  // ==========================================================================
  // torch.nn.functional.* Namespace Operations
  // ==========================================================================

  'nn.functional.relu': UnaryOpSchema<'nn.functional.relu', IdentityShape, 'same'>;
  'nn.functional.prelu': BinaryOpSchema<'nn.functional.prelu', BroadcastShapeRule, 'same'>;
  'nn.functional.leaky_relu': UnaryOpSchema<
    'nn.functional.leaky_relu',
    IdentityShape,
    'float',
    { negative_slope?: number }
  >;
  'nn.functional.rrelu': UnaryOpSchema<
    'nn.functional.rrelu',
    IdentityShape,
    'float',
    { lower?: number; upper?: number; slope?: number }
  >;
  'nn.functional.softmin': UnaryOpSchema<
    'nn.functional.softmin',
    IdentityShape,
    'float',
    { dim?: number }
  >;
  'nn.functional.sigmoid': UnaryOpSchema<'nn.functional.sigmoid', IdentityShape, 'float'>;
  'nn.functional.logsigmoid': UnaryOpSchema<'nn.functional.logsigmoid', IdentityShape, 'float'>;
  'nn.functional.tanh': UnaryOpSchema<'nn.functional.tanh', IdentityShape, 'float'>;
  'nn.functional.gelu': UnaryOpSchema<'nn.functional.gelu', IdentityShape, 'float'>;
  'nn.functional.glu': UnaryOpSchema<'nn.functional.glu', IdentityShape, 'same', { dim?: number }>;
  'nn.functional.silu': UnaryOpSchema<'nn.functional.silu', IdentityShape, 'float'>;
  'nn.functional.mish': UnaryOpSchema<'nn.functional.mish', IdentityShape, 'float'>;
  'nn.functional.hardsigmoid': UnaryOpSchema<'nn.functional.hardsigmoid', IdentityShape, 'float'>;
  'nn.functional.hardswish': UnaryOpSchema<'nn.functional.hardswish', IdentityShape, 'float'>;
  'nn.functional.hardtanh': UnaryOpSchema<
    'nn.functional.hardtanh',
    IdentityShape,
    'float',
    { min_val?: number; max_val?: number }
  >;
  'nn.functional.hardshrink': UnaryOpSchema<
    'nn.functional.hardshrink',
    IdentityShape,
    'float',
    { lambd?: number }
  >;
  'nn.functional.softshrink': UnaryOpSchema<
    'nn.functional.softshrink',
    IdentityShape,
    'float',
    { lambd?: number }
  >;
  'nn.functional.softplus': UnaryOpSchema<
    'nn.functional.softplus',
    IdentityShape,
    'float',
    { beta?: number; threshold?: number }
  >;
  'nn.functional.softsign': UnaryOpSchema<'nn.functional.softsign', IdentityShape, 'float'>;
  'nn.functional.tanhshrink': UnaryOpSchema<'nn.functional.tanhshrink', IdentityShape, 'float'>;
  'nn.functional.elu': UnaryOpSchema<
    'nn.functional.elu',
    IdentityShape,
    'float',
    { alpha?: number }
  >;
  'nn.functional.celu': UnaryOpSchema<
    'nn.functional.celu',
    IdentityShape,
    'float',
    { alpha?: number }
  >;
  'nn.functional.selu': UnaryOpSchema<'nn.functional.selu', IdentityShape, 'float'>;
  'nn.functional.relu6': UnaryOpSchema<'nn.functional.relu6', IdentityShape, 'same'>;
  'nn.functional.threshold': UnaryOpSchema<
    'nn.functional.threshold',
    IdentityShape,
    'same',
    { threshold?: number; value?: number }
  >;
  'nn.functional.softmax': UnaryOpSchema<
    'nn.functional.softmax',
    IdentityShape,
    'float',
    { dim?: number }
  >;
  'nn.functional.log_softmax': UnaryOpSchema<
    'nn.functional.log_softmax',
    IdentityShape,
    'float',
    { dim?: number }
  >;
  'nn.functional.dropout': UnaryOpSchema<
    'nn.functional.dropout',
    IdentityShape,
    'same',
    { p?: number; training?: boolean }
  >;
  'nn.functional.linear': BinaryOpSchema<'nn.functional.linear', 'matmul', 'same'>;
}
add(BinaryOpSchema<'add', BroadcastShapeRule, 'same'>)
sub(BinaryOpSchema<'sub', BroadcastShapeRule, 'same'>)
mul(BinaryOpSchema<'mul', BroadcastShapeRule, 'same'>)
div(BinaryOpSchema<'div', BroadcastShapeRule, 'same'>)
pow(BinaryOpSchema<'pow', BroadcastShapeRule, 'float'>)
float_power(BinaryOpSchema<'float_power', BroadcastShapeRule, 'float'>)
remainder(BinaryOpSchema<'remainder', BroadcastShapeRule, 'same'>)
fmod(BinaryOpSchema<'fmod', BroadcastShapeRule, 'float'>)
floor_divide(BinaryOpSchema<'floor_divide', BroadcastShapeRule, 'same'>)
maximum(BinaryOpSchema<'maximum', BroadcastShapeRule, 'same'>)
minimum(BinaryOpSchema<'minimum', BroadcastShapeRule, 'same'>)
fmax(BinaryOpSchema<'fmax', BroadcastShapeRule, 'float'>)
fmin(BinaryOpSchema<'fmin', BroadcastShapeRule, 'float'>)
atan2(BinaryOpSchema<'atan2', BroadcastShapeRule, 'float'>)
hypot(BinaryOpSchema<'hypot', BroadcastShapeRule, 'float'>)
copysign(BinaryOpSchema<'copysign', BroadcastShapeRule, 'float'>)
logaddexp(BinaryOpSchema<'logaddexp', BroadcastShapeRule, 'float'>)
logaddexp2(BinaryOpSchema<'logaddexp2', BroadcastShapeRule, 'float'>)
xlogy(BinaryOpSchema<'xlogy', BroadcastShapeRule, 'float'>)
ldexp(BinaryOpSchema<'ldexp', BroadcastShapeRule, 'float'>)
nextafter(BinaryOpSchema<'nextafter', BroadcastShapeRule, 'float'>)
bitwise_and(BinaryOpSchema<'bitwise_and', BroadcastShapeRule, 'same'>)
bitwise_or(BinaryOpSchema<'bitwise_or', BroadcastShapeRule, 'same'>)
bitwise_xor(BinaryOpSchema<'bitwise_xor', BroadcastShapeRule, 'same'>)
bitwise_left_shift(BinaryOpSchema<'bitwise_left_shift', BroadcastShapeRule, 'same'>)
bitwise_right_shift(BinaryOpSchema<'bitwise_right_shift', BroadcastShapeRule, 'same'>)
logical_and(BinaryOpSchema<'logical_and', BroadcastShapeRule, 'boolean'>)
logical_or(BinaryOpSchema<'logical_or', BroadcastShapeRule, 'boolean'>)
logical_xor(BinaryOpSchema<'logical_xor', BroadcastShapeRule, 'boolean'>)
gcd(BinaryOpSchema<'gcd', BroadcastShapeRule, 'same'>)
lcm(BinaryOpSchema<'lcm', BroadcastShapeRule, 'same'>)
eq(BinaryOpSchema<'eq', BroadcastShapeRule, 'boolean'>)
ne(BinaryOpSchema<'ne', BroadcastShapeRule, 'boolean'>)
lt(BinaryOpSchema<'lt', BroadcastShapeRule, 'boolean'>)
le(BinaryOpSchema<'le', BroadcastShapeRule, 'boolean'>)
gt(BinaryOpSchema<'gt', BroadcastShapeRule, 'boolean'>)
ge(BinaryOpSchema<'ge', BroadcastShapeRule, 'boolean'>)
matmul(BinaryOpSchema<'matmul', MatmulShapeRule, 'same'>)
mm(BinaryOpSchema<'mm', MMShapeRule, 'same'>)
bmm(BinaryOpSchema<'bmm', MatmulShapeRule, 'same'>)
dot(BinaryOpSchema<'dot', 'dot', 'same'>)
mv(BinaryOpSchema<'mv', 'mv', 'same'>)
neg(UnaryOpSchema<'neg', IdentityShape, 'same'>)
abs(UnaryOpSchema<'abs', IdentityShape, 'same'>)
sign(UnaryOpSchema<'sign', IdentityShape, 'same'>)
positive(UnaryOpSchema<'positive', IdentityShape, 'same'>)
square(UnaryOpSchema<'square', IdentityShape, 'same'>)
reciprocal(UnaryOpSchema<'reciprocal', IdentityShape, 'float'>)
ceil(UnaryOpSchema<'ceil', IdentityShape, 'float'>)
floor(UnaryOpSchema<'floor', IdentityShape, 'float'>)
round(UnaryOpSchema<'round', IdentityShape, 'float'>)
trunc(UnaryOpSchema<'trunc', IdentityShape, 'float'>)
frac(UnaryOpSchema<'frac', IdentityShape, 'float'>)
exp(UnaryOpSchema<'exp', IdentityShape, 'float'>)
exp2(UnaryOpSchema<'exp2', IdentityShape, 'float'>)
expm1(UnaryOpSchema<'expm1', IdentityShape, 'float'>)
log(UnaryOpSchema<'log', IdentityShape, 'float'>)
log2(UnaryOpSchema<'log2', IdentityShape, 'float'>)
log10(UnaryOpSchema<'log10', IdentityShape, 'float'>)
log1p(UnaryOpSchema<'log1p', IdentityShape, 'float'>)
sqrt(UnaryOpSchema<'sqrt', IdentityShape, 'float'>)
rsqrt(UnaryOpSchema<'rsqrt', IdentityShape, 'float'>)
sin(UnaryOpSchema<'sin', IdentityShape, 'float'>)
cos(UnaryOpSchema<'cos', IdentityShape, 'float'>)
tan(UnaryOpSchema<'tan', IdentityShape, 'float'>)
asin(UnaryOpSchema<'asin', IdentityShape, 'float'>)
acos(UnaryOpSchema<'acos', IdentityShape, 'float'>)
atan(UnaryOpSchema<'atan', IdentityShape, 'float'>)
sinh(UnaryOpSchema<'sinh', IdentityShape, 'float'>)
cosh(UnaryOpSchema<'cosh', IdentityShape, 'float'>)
asinh(UnaryOpSchema<'asinh', IdentityShape, 'float'>)
acosh(UnaryOpSchema<'acosh', IdentityShape, 'float'>)
atanh(UnaryOpSchema<'atanh', IdentityShape, 'float'>)
relu(UnaryOpSchema<'relu', IdentityShape, 'same'>)
prelu(BinaryOpSchema<'prelu', BroadcastShapeRule, 'same'>)
elu(UnaryOpSchema<'elu', IdentityShape, 'float'>)
celu(UnaryOpSchema<'celu', IdentityShape, 'float'>)
selu(UnaryOpSchema<'selu', IdentityShape, 'float'>)
leaky_relu(UnaryOpSchema<'leaky_relu', IdentityShape, 'float'>)
rrelu(UnaryOpSchema<'rrelu', IdentityShape, 'float'>)
sigmoid(UnaryOpSchema<'sigmoid', IdentityShape, 'float'>)
logsigmoid(UnaryOpSchema<'logsigmoid', IdentityShape, 'float'>)
tanh(UnaryOpSchema<'tanh', IdentityShape, 'float'>)
gelu(UnaryOpSchema<'gelu', IdentityShape, 'float'>)
glu(UnaryOpSchema<'glu', IdentityShape, 'same'>)
silu(UnaryOpSchema<'silu', IdentityShape, 'float'>)
mish(UnaryOpSchema<'mish', IdentityShape, 'float'>)
hardsigmoid(UnaryOpSchema<'hardsigmoid', IdentityShape, 'float'>)
hardswish(UnaryOpSchema<'hardswish', IdentityShape, 'float'>)
hardtanh(UnaryOpSchema<'hardtanh', IdentityShape, 'float'>)
hardshrink(UnaryOpSchema<'hardshrink', IdentityShape, 'float'>)
softshrink(UnaryOpSchema<'softshrink', IdentityShape, 'float'>)
softmin(UnaryOpSchema<'softmin', IdentityShape, 'float'>)
softplus(UnaryOpSchema<'softplus', IdentityShape, 'float'>)
softsign(UnaryOpSchema<'softsign', IdentityShape, 'float'>)
tanhshrink(UnaryOpSchema<'tanhshrink', IdentityShape, 'float'>)
relu6(UnaryOpSchema<'relu6', IdentityShape, 'same'>)
threshold(UnaryOpSchema<'threshold', IdentityShape, 'same'>)
erf(UnaryOpSchema<'erf', IdentityShape, 'float'>)
erfc(UnaryOpSchema<'erfc', IdentityShape, 'float'>)
erfinv(UnaryOpSchema<'erfinv', IdentityShape, 'float'>)
lgamma(UnaryOpSchema<'lgamma', IdentityShape, 'float'>)
digamma(UnaryOpSchema<'digamma', IdentityShape, 'float'>)
i0(UnaryOpSchema<'i0', IdentityShape, 'float'>)
logit(UnaryOpSchema<'logit', IdentityShape, 'float'>)
sinc(UnaryOpSchema<'sinc', IdentityShape, 'float'>)
deg2rad(UnaryOpSchema<'deg2rad', IdentityShape, 'float'>)
rad2deg(UnaryOpSchema<'rad2deg', IdentityShape, 'float'>)
bitwise_not(UnaryOpSchema<'bitwise_not', IdentityShape, 'same'>)
logical_not(UnaryOpSchema<'logical_not', IdentityShape, 'boolean'>)
isnan(UnaryOpSchema<'isnan', IdentityShape, 'boolean'>)
isinf(UnaryOpSchema<'isinf', IdentityShape, 'boolean'>)
isfinite(UnaryOpSchema<'isfinite', IdentityShape, 'boolean'>)
isposinf(UnaryOpSchema<'isposinf', IdentityShape, 'boolean'>)
isneginf(UnaryOpSchema<'isneginf', IdentityShape, 'boolean'>)
signbit(UnaryOpSchema<'signbit', IdentityShape, 'boolean'>)
isreal(UnaryOpSchema<'isreal', IdentityShape, 'boolean'>)
sum(ReductionOpSchema<'sum', 'same'>)
prod(ReductionOpSchema<'prod', 'same'>)
mean(ReductionOpSchema<'mean', 'float'>)
std(ReductionOpSchema<'std', 'float'>)
var(ReductionOpSchema<'var', 'float'>)
max(ReductionOpSchema<'max', 'same'>)
min(ReductionOpSchema<'min', 'same'>)
amax(ReductionOpSchema<'amax', 'same'>)
amin(ReductionOpSchema<'amin', 'same'>)
argmax(ReductionOpSchema<'argmax', 'same'>)
argmin(ReductionOpSchema<'argmin', 'same'>)
any(ReductionOpSchema<'any', 'boolean'>)
all(ReductionOpSchema<'all', 'boolean'>)
logsumexp(ReductionOpSchema<'logsumexp', 'float'>)
norm(ReductionOpSchema<'norm', 'float'>)
zeros(CreationOpSchema<'zeros'>)
ones(CreationOpSchema<'ones'>)
empty(CreationOpSchema<'empty'>)
full(CreationOpSchema<'full'>)
arange(CreationOpSchema<'arange'>)
linspace(CreationOpSchema<'linspace'>)
logspace(CreationOpSchema<'logspace'>)
eye(CreationOpSchema<'eye'>)
rand(CreationOpSchema<'rand'>)
randn(CreationOpSchema<'randn'>)
randint(CreationOpSchema<'randint'>)
reshape(ShapeOpSchema<'reshape'>)
view(ShapeOpSchema<'view'>)
transpose(ShapeOpSchema<'transpose'>)
permute(ShapeOpSchema<'permute'>)
squeeze(ShapeOpSchema<'squeeze'>)
unsqueeze(ShapeOpSchema<'unsqueeze'>)
flatten(ShapeOpSchema<'flatten'>)
expand(ShapeOpSchema<'expand'>)
contiguous(ShapeOpSchema<'contiguous'>)
clone(ShapeOpSchema<'clone'>)
t(ShapeOpSchema<'t'>)
masked_fill(ShapeOpSchema<'masked_fill'>)
'special.expm1'(UnaryOpSchema<'special.expm1', IdentityShape, 'float'>)
'special.exp2'(UnaryOpSchema<'special.exp2', IdentityShape, 'float'>)
'special.log1p'(UnaryOpSchema<'special.log1p', IdentityShape, 'float'>)
'special.xlogy'(BinaryOpSchema<'special.xlogy', BroadcastShapeRule, 'float'>)
'special.erf'(UnaryOpSchema<'special.erf', IdentityShape, 'float'>)
'special.erfc'(UnaryOpSchema<'special.erfc', IdentityShape, 'float'>)
'special.erfinv'(UnaryOpSchema<'special.erfinv', IdentityShape, 'float'>)
'special.i0'(UnaryOpSchema<'special.i0', IdentityShape, 'float'>)
'special.i0e'(UnaryOpSchema<'special.i0e', IdentityShape, 'float'>)
'special.i1'(UnaryOpSchema<'special.i1', IdentityShape, 'float'>)
'special.i1e'(UnaryOpSchema<'special.i1e', IdentityShape, 'float'>)
'special.logit'(UnaryOpSchema<'special.logit', IdentityShape, 'float'>)
'special.expit'(UnaryOpSchema<'special.expit', IdentityShape, 'float'>)
'special.digamma'(UnaryOpSchema<'special.digamma', IdentityShape, 'float'>)
'special.gammaln'(UnaryOpSchema<'special.gammaln', IdentityShape, 'float'>)
'special.entr'(UnaryOpSchema<'special.entr', IdentityShape, 'float'>)
'special.xlog1py'(BinaryOpSchema<'special.xlog1py', BroadcastShapeRule, 'float'>)
'special.zeta'(BinaryOpSchema<'special.zeta', BroadcastShapeRule, 'float'>)
'special.ndtr'(UnaryOpSchema<'special.ndtr', IdentityShape, 'float'>)
'special.ndtri'(UnaryOpSchema<'special.ndtri', IdentityShape, 'float'>)
'special.log_ndtr'(UnaryOpSchema<'special.log_ndtr', IdentityShape, 'float'>)
'special.sinc'(UnaryOpSchema<'special.sinc', IdentityShape, 'float'>)
'special.round'(UnaryOpSchema<'special.round', IdentityShape, 'float'>)
'nn.functional.relu'(UnaryOpSchema<'nn.functional.relu', IdentityShape, 'same'>)
'nn.functional.prelu'(BinaryOpSchema<'nn.functional.prelu', BroadcastShapeRule, 'same'>)
'nn.functional.leaky_relu'(UnaryOpSchema< 'nn.functional.leaky_relu', IdentityShape, 'float', { negative_slope?: number } >)
'nn.functional.rrelu'(UnaryOpSchema< 'nn.functional.rrelu', IdentityShape, 'float', { lower?: number; upper?: number; slope?: number } >)
'nn.functional.softmin'(UnaryOpSchema< 'nn.functional.softmin', IdentityShape, 'float', { dim?: number } >)
'nn.functional.sigmoid'(UnaryOpSchema<'nn.functional.sigmoid', IdentityShape, 'float'>)
'nn.functional.logsigmoid'(UnaryOpSchema<'nn.functional.logsigmoid', IdentityShape, 'float'>)
'nn.functional.tanh'(UnaryOpSchema<'nn.functional.tanh', IdentityShape, 'float'>)
'nn.functional.gelu'(UnaryOpSchema<'nn.functional.gelu', IdentityShape, 'float'>)
'nn.functional.glu'(UnaryOpSchema<'nn.functional.glu', IdentityShape, 'same', { dim?: number }>)
'nn.functional.silu'(UnaryOpSchema<'nn.functional.silu', IdentityShape, 'float'>)
'nn.functional.mish'(UnaryOpSchema<'nn.functional.mish', IdentityShape, 'float'>)
'nn.functional.hardsigmoid'(UnaryOpSchema<'nn.functional.hardsigmoid', IdentityShape, 'float'>)
'nn.functional.hardswish'(UnaryOpSchema<'nn.functional.hardswish', IdentityShape, 'float'>)
'nn.functional.hardtanh'(UnaryOpSchema< 'nn.functional.hardtanh', IdentityShape, 'float', { min_val?: number; max_val?: number } >)
'nn.functional.hardshrink'(UnaryOpSchema< 'nn.functional.hardshrink', IdentityShape, 'float', { lambd?: number } >)
'nn.functional.softshrink'(UnaryOpSchema< 'nn.functional.softshrink', IdentityShape, 'float', { lambd?: number } >)
'nn.functional.softplus'(UnaryOpSchema< 'nn.functional.softplus', IdentityShape, 'float', { beta?: number; threshold?: number } >)
'nn.functional.softsign'(UnaryOpSchema<'nn.functional.softsign', IdentityShape, 'float'>)
'nn.functional.tanhshrink'(UnaryOpSchema<'nn.functional.tanhshrink', IdentityShape, 'float'>)
'nn.functional.elu'(UnaryOpSchema< 'nn.functional.elu', IdentityShape, 'float', { alpha?: number } >)
'nn.functional.celu'(UnaryOpSchema< 'nn.functional.celu', IdentityShape, 'float', { alpha?: number } >)
'nn.functional.selu'(UnaryOpSchema<'nn.functional.selu', IdentityShape, 'float'>)
'nn.functional.relu6'(UnaryOpSchema<'nn.functional.relu6', IdentityShape, 'same'>)
'nn.functional.threshold'(UnaryOpSchema< 'nn.functional.threshold', IdentityShape, 'same', { threshold?: number; value?: number } >)
'nn.functional.softmax'(UnaryOpSchema< 'nn.functional.softmax', IdentityShape, 'float', { dim?: number } >)
'nn.functional.log_softmax'(UnaryOpSchema< 'nn.functional.log_softmax', IdentityShape, 'float', { dim?: number } >)
'nn.functional.dropout'(UnaryOpSchema< 'nn.functional.dropout', IdentityShape, 'same', { p?: number; training?: boolean } >)
'nn.functional.linear'(BinaryOpSchema<'nn.functional.linear', 'matmul', 'same'>)

Central registry of all operation schemas.

This interface defines the type signature for every operation in torch.js. Users can extend this interface via TypeScript declaration merging to register custom operations:

Examples

declare module '@torchjsorg/torch.js' {
  interface OpSchemas {
    my_custom_op: UnaryOpSchema<'my_custom_op', IdentityShape, 'same'>;
  }
}
Previous
OpSchema
Next
outer