Torch Script¶
Torch Script is a way to create serializable and optimizable models from PyTorch code. Any code written in Torch Script can be saved from your Python process and loaded in a process where there is no Python dependency.
We provide tools to incrementally transition a model from being a pure Python program to a Torch Script program that can be run independently from Python, for instance, in a standalone C++ program. This makes it possible to train models in PyTorch using familiar tools and then export the model to a production environment where it is not a good idea to run models as Python programs for performance and multi-threading reasons.
Creating Torch Script Code¶
-
class
torch.jit.
ScriptModule
[source]¶ A wrapper around C++
torch::jit::Module
.ScriptModule
s contain methods, attributes, parameters, and constants. These can be accessed the same as on a normalnn.Module
.-
save
(filename)¶ Save an offline version of this module for use in a separate process. The saved module serializes all of the methods and parameters of this module. It can be loaded into the C++ API using
torch::jit::load(filename)
or into the Python API withtorch.jit.load(filename)
.To be able to save a module, it must not make any calls to native python functions. This means that all submodules must be subclasses of ScriptModules as well.
Danger
All modules, no matter their device, are always loaded onto the CPU during loading. This is different from
torch.load()
’s semantics and may change in the future.
-
property
code
¶ Returns a pretty-printed representation (as valid Python syntax) of the internal graph for the
forward
method. See inspecting-code for details.
-
property
code_with_constants
¶ Returns a tuple of:
[0] a pretty-printed representation (as valid Python syntax) of the internal graph for the
forward
method. See code. [1] a ConstMap following the CONSTANT.cN format of the output in [0]. The indices in the [0] output are keys to the underlying constant’s values.See inspecting-code for details.
-
property
graph
¶ Returns a string representation of the internal graph for the
forward
method. See interpreting-graphs for details.
-
property
inlined_graph
¶ Returns a string representation of the internal graph for the
forward
method. This graph will be preprocessed to inline all function and method calls. See interpreting-graphs for details.
-
save
(f, _extra_files={})¶ See
torch.jit.save
for details.
-
-
torch.jit.
load
(f, map_location=None, _extra_files=None)[source]¶ Load a
ScriptModule
orScriptFunction
previously saved withtorch.jit.save
All previously saved modules, no matter their device, are first loaded onto CPU, and then are moved to the devices they were saved from. If this fails (e.g. because the run time system doesn’t have certain devices), an exception is raised.
- Parameters
f – a file-like object (has to implement read, readline, tell, and seek), or a string containing a file name
map_location (string or torch.device) – A simplified version of
map_location
in torch.jit.save used to dynamically remap storages to an alternative set of devices._extra_files (dictionary of filename to content) – The extra filenames given in the map would be loaded and their content would be stored in the provided map.
- Returns
A
ScriptModule
object.
Example:
import torch import io torch.jit.load('scriptmodule.pt') # Load ScriptModule from io.BytesIO object with open('scriptmodule.pt', 'rb') as f: buffer = io.BytesIO(f.read()) # Load all tensors to the original device torch.jit.load(buffer) # Load all tensors onto CPU, using a device buffer.seek(0) torch.jit.load(buffer, map_location=torch.device('cpu')) # Load all tensors onto CPU, using a string buffer.seek(0) torch.jit.load(buffer, map_location='cpu') # Load with extra files. extra_files = {'foo.txt': ''} # values will be replaced with data torch.jit.load('scriptmodule.pt', _extra_files=extra_files) print(extra_files['foo.txt'])
-
torch.jit.
trace
(func, example_inputs, optimize=None, check_trace=True, check_inputs=None, check_tolerance=1e-05, strict=True, _force_outplace=False, _module_class=None, _compilation_unit=<torch.jit.CompilationUnit object>)[source]¶ Trace a function and return an executable or
ScriptFunction
that will be optimized using just-in-time compilation. Tracing is ideal for code that operates only onTensor
s and lists, dictionaries, and tuples ofTensor
s.Using torch.jit.trace and torch.jit.trace_module, you can turn an existing module or Python function into a TorchScript
ScriptFunction
orScriptModule
. You must provide example inputs, and we run the function, recording the operations performed on all the tensors.The resulting recording of a standalone function produces ScriptFunction.
The resulting recording of nn.Module.forward or nn.Module produces ScriptModule.
This module also contains any parameters that the original module had as well.
Warning
Tracing only correctly records functions and modules which are not data dependent (e.g., do not have conditionals on data in tensors) and do not have any untracked external dependencies (e.g., perform input/output or access global variables). Tracing only records operations done when the given function is run on the given tensors. Therefore, the returned ScriptModule will always run the same traced graph on any input. This has some important implications when your module is expected to run different sets of operations, depending on the input and/or the module state. For example,
Tracing will not record any control-flow like if-statements or loops. When this control-flow is constant across your module, this is fine and it often inlines the control-flow decisions. But sometimes the control-flow is actually part of the model itself. For instance, a recurrent network is a loop over the (possibly dynamic) length of an input sequence.
In the returned
ScriptModule
, operations that have different behaviors intraining
andeval
modes will always behave as if it is in the mode it was in during tracing, no matter which mode the ScriptModule is in.
In cases like these, tracing would not be appropriate and
scripting
is a better choice. If you trace such models, you may silently get incorrect results on subsequent invocations of the model. The tracer will try to emit warnings when doing something that may cause an incorrect trace to be produced.- Parameters
func (callable or torch.nn.Module) – A Python function or torch.nn.Module that will be run with example_inputs. func arguments and return values must be tensors or (possibly nested) tuples that contain tensors. When a module is passed torch.jit.trace, only the
forward
method is run and traced (seetorch.jit.trace
for details).example_inputs (tuple or torch.Tensor) – A tuple of example inputs that will be passed to the function while tracing. The resulting trace can be run with inputs of different types and shapes assuming the traced operations support those types and shapes. example_inputs may also be a single Tensor in which case it is automatically wrapped in a tuple.
- Keyword Arguments
check_trace (
bool
, optional) – Check if the same inputs run through traced code produce the same outputs. Default:True
. You might want to disable this if, for example, your network contains non- deterministic ops or if you are sure that the network is correct despite a checker failure.check_inputs (list of tuples, optional) – A list of tuples of input arguments that should be used to check the trace against what is expected. Each tuple is equivalent to a set of input arguments that would be specified in
example_inputs
. For best results, pass in a set of checking inputs representative of the space of shapes and types of inputs you expect the network to see. If not specified, the originalexample_inputs
are used for checkingcheck_tolerance (float, optional) – Floating-point comparison tolerance to use in the checker procedure. This can be used to relax the checker strictness in the event that results diverge numerically for a known reason, such as operator fusion.
strict (
bool
, optional) – run the tracer in a strict mode or not (default:True
). Only turn this off when you want the tracer to record your mutable container types (currentlylist
/dict
) and you are sure that the container you are using in your problem is aconstant
structure and does not get used as control flow (if, for) conditions.
- Returns
If func is nn.Module or
forward
of nn.Module, trace returns aScriptModule
object with a singleforward
method containing the traced code. The returned ScriptModule will have the same set of sub-modules and parameters as the originalnn.Module
. Iffunc
is a standalone function,trace
returns ScriptFunction.
Example (tracing a function):
import torch def foo(x, y): return 2 * x + y # Run `foo` with the provided inputs and record the tensor operations traced_foo = torch.jit.trace(foo, (torch.rand(3), torch.rand(3))) # `traced_foo` can now be run with the TorchScript interpreter or saved # and loaded in a Python-free environment
Example (tracing an existing module):
import torch import torch.nn as nn class Net(nn.Module): def __init__(self): super(Net, self).__init__() self.conv = nn.Conv2d(1, 1, 3) def forward(self, x): return self.conv(x) n = Net() example_weight = torch.rand(1, 1, 3, 3) example_forward_input = torch.rand(1, 1, 3, 3) # Trace a specific method and construct `ScriptModule` with # a single `forward` method module = torch.jit.trace(n.forward, example_forward_input) # Trace a module (implicitly traces `forward`) and construct a # `ScriptModule` with a single `forward` method module = torch.jit.trace(n, example_forward_input)
Mixing Tracing and Scripting¶
In many cases either tracing or script is an easier approach for converting a model. We allow you to compose tracing and scripting to suit the particular requirements of a part of a model.
Scripted functions can call traced ones. This is particularly useful when you need to use control-flow around a simple feed-forward model. For instance the beam search of a sequence to sequence model will typically be written in script but can call an encoder module generated using tracing.
Example:
import torch
def foo(x, y):
return 2 * x + y
traced_foo = torch.jit.trace(foo, (torch.rand(3), torch.rand(3)))
@torch.jit.script
def bar(x):
return traced_foo(x, x)
Traced functions can call script functions. This is useful when a small part of a model requires some control-flow even though most of the model is just a feed-forward network. Control-flow inside of a script function called by a traced function is preserved correctly:
Example:
import torch
@torch.jit.script
def foo(x, y):
if x.max() > y.max():
r = x
else:
r = y
return r
def bar(x, y, z):
return foo(x, y) + z
traced_bar = torch.jit.trace(bar, (torch.rand(3), torch.rand(3), torch.rand(3))
This composition also works for modules as well, where it can be used to generate a submodule using tracing that can be called from the methods of a script module:
Example:
import torch
import torchvision
class MyScriptModule(torch.jit.ScriptModule):
def __init__(self):
super(MyScriptModule, self).__init__()
self.means = torch.nn.Parameter(torch.tensor([103.939, 116.779, 123.68])
.resize_(1, 3, 1, 1))
self.resnet = torch.jit.trace(torchvision.models.resnet18(),
torch.rand(1, 3, 224, 224))
@torch.jit.script_method
def forward(self, input):
return self.resnet(input - self.means)
Torch Script Language Reference¶
Torch Script is a subset of Python that can either be written directly (using the @script annotations) or generated automatically from Python code via tracing. When using tracing, code is automatically converted into this subset of Python by recording only the actual operators on tensors and simply executing and discarding the other surrounding Python code.
When writing Torch Script directly using @script annotations, the programmer must only use the subset of Python supported in Torch Script. This section documents what is supported in Torch Script as if it were a language reference for a stand alone language. Any features of Python not mentioned in this reference are not part of Torch Script.
As a subset of Python any valid Torch Script function is also a valid Python function. This makes it possible to remove the @script annotations and debug the function using standard Python tools like pdb. The reverse is not true: there are many valid python programs that are not valid Torch Script programs. Instead, Torch Script focuses specifically on the features of Python that are needed to represent neural network models in Torch.
-
PYTORCH_JIT=1
¶ Setting the environment variable
PYTORCH_JIT=0
will disable all script and tracing annotations. If there is hard-to-debug error in one of your ScriptModules, you can use this flag to force everything to run using native Python. This allows the use of tools likepdb
to debug code.
Types¶
The largest difference between Torch Script and the full Python language is that Torch Script only support a small set of types that are needed to express neural net models. In particular Torch Script supports:
Tensor
A PyTorch tensor of any dtype, dimension, or backend.
Tuple[T0, T1, ...]
A tuple containing subtypes
T0
,T1
, etc. (e.g.Tuple[Tensor, Tensor]
)int
A scalar integer
float
A scalar floating point number
List[T]
A list of which all members are type
T
Unlike Python, each variable in Torch Script function must have a single static type. This makes it easier to optimize Torch Script functions.
Example:
@torch.jit.script
def an_error(x):
if x:
r = torch.rand(1)
else:
r = 4
return r # Type mismatch: r is set to type Tensor in the true branch
# and type int in the false branch
By default, all parameters to a Torch Script function are assumed to be Tensor because this is the most common type used in modules. To specify that an argument to a Torch Script function is another type, it is possible to use MyPy-style type annotations using the types listed above:
Example:
@torch.jit.script
def foo(x, tup):
# type: (int, Tuple[Tensor, Tensor]) -> Tensor
t0, t1 = tup
return t0 + t1 + x
print(foo(3, (torch.rand(3), torch.rand(3))))
Note
It is also possible to annotate types with Python 3 type annotations. In our examples, we use comment-based annotations to ensure Python 2 compatibility as well.
Expressions¶
The following Python Expressions are supported
- Literals
True
,False
,None
,'string literals'
,"string literals"
, number literals3
(interpreted as int)3.4
(interpreter as a float)- Variables
a
Note
See Variable Resolution for how variables are resolved.
- Tuple Construction
(3, 4)
,(3,)
- List Construction
[3, 4]
,[]
,[torch.rand(3), torch.rand(4)]
Note
an empty list is assumed have type
List[Tensor]
. The types of other list literals are derived from the type of the members.- Arithmetic Operators
a + b
a - b
a * b
a / b
a ^ b
a @ b
- Comparison Operators
a == b
a != b
a < b
a > b
a <= b
a >= b
- Logical Operators
a and b
a or b
not b
- Subscripts
t[0]
t[-1]
t[0:2]
t[1:]
t[:1]
t[:]
t[0, 1]
t[0, 1:2]
t[0, :1]
t[-1, 1:, 0]
t[1:, -1, 0]
t[i:j, i]
Note
Torch Script currently does not support mutating tensors in place, so any tensor indexing can only appear on the right-hand size of an expression.
- Function calls
Calls to built-in functions:
torch.rand(3, dtype=torch.int)
Calls to other script functions:
import torch @torch.jit.script def foo(x): return x + 1 @torch.jit.script def bar(x): return foo(x)
- Method calls
Calls to methods of builtin types like tensor:
x.mm(y)
When defining a Script method inside of a ScriptModule, the
@script_method
annotation is used. Inside of these methods it is possible to call other methods of this class or access methods on the submodules.Calling a submodule directly (e.g.
self.resnet(input)
) is equivalent to calling itsforward
method (e.g.self.resnet.forward(input)
)import torch class MyScriptModule(torch.jit.ScriptModule): def __init__(self): super(MyScriptModule, self).__init__() self.means = torch.nn.Parameter(torch.tensor([103.939, 116.779, 123.68]) .resize_(1, 3, 1, 1)) self.resnet = torch.jit.trace(torchvision.models.resnet18(), torch.rand(1, 3, 224, 224)) @torch.jit.script_method def helper(self, input): return self.resnet(input - self.means) @torch.jit.script_method def forward(self, input): return self.helper(input)
- If expressions
x if x > y else y
- Casts
float(ten)
,int(3.5)
,bool(ten)
- Accessing Module Parameters
self.my_parameter
self.my_submodule.my_parameter
Statements¶
Torch Script supports the following types of statements:
Simple Assignments
a = b a += b # short-hand for a = a + b, does not operate in-place on a a -= b
Pattern Matching Assignments
a, b = tuple_or_list a, b, *c = a_tuple
Print Statements
print("the result of an add:", a + b)
If Statements
if a < 4: r = -a elif a < 3: r = a + a else: r = 3 * a
While Loops
a = 0 while a < 4: print(a) a += 1
For loops with range
x = 0 for i in range(10): x *= iNote
Script currently does not support iterating over generic iterable objects like lists or tensors. Script currently does not support start or increment parameters to range. These will be added in a future version.
For loops over tuples:
tup = (3, torch.rand(4)) for x in tup: print(x)Note
for loops over tuples will unroll the loop, generating a body for each member of the tuple. The body must type-check correctly for each member.
For loops over constant torch.nn.ModuleList
class SubModule(torch.jit.ScriptModule): def __init__(self): super(Sub, self).__init__() self.weight = nn.Parameter(torch.randn(2)) @torch.jit.script_method def forward(self, input): return self.weight + input class MyModule(torch.jit.ScriptModule): __constants__ = ['mods'] def __init__(self): super(MyModule, self).__init__() self.mods = torch.nn.ModuleList([SubModule() for i in range(10)]) @torch.jit.script_method def forward(self, v): for module in self.mods: v = m(v) return vNote
To use a module list inside a
@script_method
it must be marked constant by adding the name of the attribute to the__constants__
list for the type. For loops over a ModuleList will unroll the body of the loop at compile time, with each member of the constant module list.
- Return
return a, b
Note
there must be a return statement as the last member of the function and return statements cannot appear anywhere else in the function. This restriction will be removed in the future.
Variable Resolution¶
Torch Script supports a subset of Python’s variable resolution (i.e. scoping) rules. Local variables behave the same as in Python, except for the restriction that a variable must have the same type along all paths through a function. If a variable has a different type on different sides of an if statement, it is an error to use it after the end of the if statement.
Similarly, a variable is not allowed to be used if it is only defined along some paths through the function.
Example:
@torch.jit.script
def foo(x):
if x < 0:
y = 4
print(y) # Error: undefined value y
Non-local variables are resolved to Python values at compile time when the function is defined. These values are then converted into Torch Script values using the rules described in Use of Python Values.
Use of Python Values¶
To make writing Torch Script more convenient, we allow script code to refer
to Python values in the surrounding scope. For instance, any time there is a
reference to torch
, the Torch Script compiler is actually resolving it to the
torch
Python module when the function is declared. These Python values are
not a first class part of Torch Script. Instead they are desugared at compile-time
into the primitive types that Torch Script supports. This section describes the
rules that are used when accessing Python values in Torch Script. They depend
on the dynamic type of the python valued referenced.
- Functions
Torch Script can call python functions. This functionality is very useful when incrementally converting a model into script. The model can be moved function-by-function to script, leaving calls to Python functions in place. This way you can incrementally check the correctness of the model as you go.
Example:
def foo(x): print("I am called with {}".format(x)) import pdb; pdb.set_trace() return x @torch.jit.script def bar(x) return foo(x + 1)
Note
Attempting to call
save
on a ScriptModule that contains calls to Python functions will fail. The intention is that this pathway is used for debugging and the calls removed or turned into script functions before saving.- Attribute Lookup On Python Modules
Torch Script can lookup attributes on modules. Builtin functions like
torch.add
are accessed this way. This allows Torch Script to call functions defined in other modules.- Python-defined Constants
Torch Script also provides a way to use constants that are defined in Python. These can be used to hard-code hyper-parameters into the function, or to define universal constants. There are two ways of specifying that a Python value should be treated as a constant.
Values looked up as attributes of a module are assumed to be constant. Example:
math.pi
Attributes of a ScriptModule can be marked constant by listing them as a member of the
__constants__
property of the class:Example:
class Foo(torch.jit.ScriptModule): __constants__ = ['a'] def __init__(self): super(Foo, self).__init__(False) self.a = 1 + 4 @torch.jit.ScriptModule def forward(self, input): return self.a + input
Supported constant Python Values are
int
bool
torch.device
torch.layout
torch.dtype
tuples containing supported types
torch.nn.ModuleList
which can be used in a TorchScript for loop
Debugging¶
- Disable JIT for Debugging
If you want to disable all JIT modes (tracing and scripting) so you can debug your program in raw Python, you can use the
PYTORCH_JIT
environment variable.PYTORCH_JIT
can be used to globally disable the JIT by setting its value to0
. Given an example script:@torch.jit.script def scripted_fn(x : torch.Tensor): for i in range(12): x = x + x return x def fn(x): x = torch.neg(x) import pdb; pdb.set_trace() return scripted_fn(x) traced_fn = torch.jit.trace(fn, (torch.rand(4, 5),)) traced_fn(torch.rand(3, 4))
Debugging this script with PDB works except for when we invoke the @script function. We can globally disable JIT, so that we can call the @script function as a normal python function and not compile it. If the above script is called
disable_jit_example.py
, we can invoke it like so:$ PYTORCH_JIT=0 python disable_jit_example.py
and we will be able to step into the @script function as a normal Python function.
- Interpreting Graphs
TorchScript uses a static single assignment (SSA) intermediate representation (IR) to represent computation. The instructions in this format consist of ATen (the C++ backend of PyTorch) operators and other primitive operators, including control flow operators for loops and conditionals. As an example:
@torch.jit.script def foo(len): # type: (int) -> torch.Tensor rv = torch.zeros(3, 4) for i in range(len): if i < 10: rv = rv - 1.0 else: rv = rv + 1.0 return rv print(foo.graph)
A
ScriptModule
with a singleforward
method will have an attributegraph
, which you can use to inspect the IR representing the computation. If the ScriptModule has more than one method, you will need to access.graph
on the method itself and not the module. We can inspect the graph of a method namedbar
on a ScriptModule by accessing.bar.graph
.The example script above produces the graph:
graph(%len : int) { %13 : float = prim::Constant[value=1]() %10 : int = prim::Constant[value=10]() %2 : int = prim::Constant[value=4]() %1 : int = prim::Constant[value=3]() %3 : int[] = prim::ListConstruct(%1, %2) %4 : int = prim::Constant[value=6]() %5 : int = prim::Constant[value=0]() %6 : int[] = prim::Constant[value=[0, -1]]() %rv.1 : Dynamic = aten::zeros(%3, %4, %5, %6) %8 : int = prim::Constant[value=1]() %rv : Dynamic = prim::Loop(%len, %8, %rv.1) block0(%i : int, %12 : Dynamic) { %11 : int = aten::lt(%i, %10) %rv.4 : Dynamic = prim::If(%11) block0() { %14 : int = prim::Constant[value=1]() %rv.2 : Dynamic = aten::sub(%12, %13, %14) -> (%rv.2) } block1() { %16 : int = prim::Constant[value=1]() %rv.3 : Dynamic = aten::add(%12, %13, %16) -> (%rv.3) } %19 : int = prim::Constant[value=1]() -> (%19, %rv.4) } return (%rv); }
Take the instruction
%rv.1 : Dynamic = aten::zeros(%3, %4, %5, %6)
for example.%rv.1 : Dynamic
means we assign the output to a (unique) value namedrv.1
, and that value is ofDynamic
type, i.e. we do not know its concrete shape.aten::zeros
is the operator (equivalent totorch.zeros
) and the input list(%3, %4, %5, %6)
specifies which values in scope should be passed as inputs. The schema for built-in functions likeaten::zeros
can be found at Builtin Functions.Notice that operators can also have associated
blocks
, namely theprim::Loop
andprim::If
operators. In the graph print-out, these operators are formatted to reflect their equivalent source code forms to facilitate easy debugging.Graphs can be inspected as shown to confirm that the computation described by a
ScriptModule
is correct, in both automated and manual fashion, as described below.- Tracing Edge Cases
There are some edge cases that exist where the trace of a given Python function/module will not be representative of the underlying code. These cases can include:
Tracing of control flow that is dependent on inputs (e.g. tensor shapes)
Tracing of in-place operations of tensor views (e.g. indexing on the left-hand side of an assignment)
Note that these cases may in fact be traceable in the future.
- Automatic Trace Checking
One way to automatically catch many errors in traces is by using
check_inputs
on thetorch.jit.trace()
API.check_inputs
takes a list of tuples of inputs that will be used to re-trace the computation and verify the results. For example:def loop_in_traced_fn(x): result = x[0] for i in range(x.size(0)): result = result * x[i] return result inputs = (torch.rand(3, 4, 5),) check_inputs = [(torch.rand(4, 5, 6),), (torch.rand(2, 3, 4),)] traced = torch.jit.trace(loop_in_traced_fn, inputs, check_inputs=check_inputs)
Gives us the following diagnostic information:
ERROR: Graphs differed across invocations! Graph diff: graph(%0 : Dynamic) { %1 : int = prim::Constant[value=0]() %2 : int = prim::Constant[value=0]() %3 : Dynamic = aten::select(%0, %1, %2) %4 : int = prim::Constant[value=0]() %5 : int = prim::Constant[value=0]() %6 : Dynamic = aten::select(%0, %4, %5) %7 : Dynamic = aten::mul(%3, %6) %8 : int = prim::Constant[value=0]() %9 : int = prim::Constant[value=1]() %10 : Dynamic = aten::select(%0, %8, %9) %11 : Dynamic = aten::mul(%7, %10) %12 : int = prim::Constant[value=0]() %13 : int = prim::Constant[value=2]() %14 : Dynamic = aten::select(%0, %12, %13) %15 : Dynamic = aten::mul(%11, %14) + %16 : int = prim::Constant[value=0]() + %17 : int = prim::Constant[value=3]() + %18 : Dynamic = aten::select(%0, %16, %17) + %19 : Dynamic = aten::mul(%15, %18) - return (%15); ? ^ + return (%19); ? ^ }
This message indicates to us that the computation differed between when we first traced it and when we traced it with the
check_inputs
. Indeed, the loop within the body ofloop_in_traced_fn
depends on the shape of the inputx
, and thus when we try anotherx
with a different shape, the trace differs.In this case, data-dependent control flow like this can be captured using script instead:
def fn(x): result = x[0] for i in range(x.size(0)): result = result * x[i] return result inputs = (torch.rand(3, 4, 5),) check_inputs = [(torch.rand(4, 5, 6),), (torch.rand(2, 3, 4),)] scripted_fn = torch.jit.script(fn) print(scripted_fn.graph) for input_tuple in [inputs] + check_inputs: torch.testing.assert_allclose(fn(*input_tuple), scripted_fn(*input_tuple))
Which produces:
graph(%x : Dynamic) { %1 : int = prim::Constant[value=0]() %2 : int = prim::Constant[value=0]() %result.1 : Dynamic = aten::select(%x, %2, %1) %4 : int = aten::size(%x, %1) %5 : int = prim::Constant[value=1]() %result : Dynamic = prim::Loop(%4, %5, %result.1) block0(%i : int, %7 : Dynamic) { %9 : int = prim::Constant[value=0]() %10 : Dynamic = aten::select(%x, %9, %i) %result.2 : Dynamic = aten::mul(%7, %10) %12 : int = prim::Constant[value=1]() -> (%12, %result.2) } return (%result); }
- Tracer Warnings
The tracer produces warnings for several problematic patterns in traced computation. As an example, take a trace of a function that contains an in-place assignment on a slice (a view) of a Tensor:
def fill_row_zero(x): x[0] = torch.rand(*x.shape[1:2]) return x traced = torch.jit.trace(fill_row_zero, (torch.rand(3, 4),)) print(traced.graph)
Produces several warnings and a graph which simply returns the input:
fill_row_zero.py:4: TracerWarning: There are 2 live references to the data region being modified when tracing in-place operator copy_ (possibly due to an assignment). This might cause the trace to be incorrect, because all other views that also reference this data will not not reflect this change in the trace! On the other hand, if all other views use the same memory chunk, but are disjoint (e.g. are outputs of torch.split), this might still be safe. x[0] = torch.rand(*x.shape[1:2]) fill_row_zero.py:6: TracerWarning: Output nr 1. of the traced function does not match the corresponding output of the Python function. Detailed error: Not within tolerance rtol=1e-05 atol=1e-05 at input[0, 1] (0.09115803241729736 vs. 0.6782537698745728) and 3 other locations (33.00%) traced = torch.jit.trace(fill_row_zero, (torch.rand(3, 4),)) graph(%0 : Float(3, 4)) { return (%0); }
We can fix this by modifying the code to not use the in-place update, but rather build up the result tensor out-of-place with torch.cat:
def fill_row_zero(x): x = torch.cat((torch.rand(1, *x.shape[1:2]), x[1:2]), dim=0) return x traced = torch.jit.trace(fill_row_zero, (torch.rand(3, 4),)) print(traced.graph)
Builtin Functions¶
Torch Script supports a subset of the builtin tensor and neural network functions that
PyTorch provides. Most methods on Tensor as well as functions in the torch
namespace are available. Many functions in torch.nn.functional
are also availiable.
We currently do not provide any builtin ScriptModules e.g. a Linear
or
Conv
module. This functionality is something that will be developed in the future.
For now we suggest using torch.jit.trace
to transform standard torch.nn
modules into ScriptModules on construction.
Supported Tensor Methods¶
Tensor.__and__(other : number) -> Tensor
Tensor.__and__(other : Tensor) -> Tensor
Tensor.__iand__(other : number) -> Tensor
Tensor.__iand__(other : Tensor) -> Tensor
Tensor.__ilshift__(other : number) -> Tensor
Tensor.__ilshift__(other : Tensor) -> Tensor
Tensor.__ior__(other : number) -> Tensor
Tensor.__ior__(other : Tensor) -> Tensor
Tensor.__irshift__(other : number) -> Tensor
Tensor.__irshift__(other : Tensor) -> Tensor
Tensor.__ixor__(other : number) -> Tensor
Tensor.__ixor__(other : Tensor) -> Tensor
Tensor.__lshift__(other : number) -> Tensor
Tensor.__lshift__(other : Tensor) -> Tensor
Tensor.__or__(other : number) -> Tensor
Tensor.__or__(other : Tensor) -> Tensor
Tensor.__rshift__(other : number) -> Tensor
Tensor.__rshift__(other : Tensor) -> Tensor
Tensor.__xor__(other : number) -> Tensor
Tensor.__xor__(other : Tensor) -> Tensor
Tensor.abs() -> Tensor
Tensor.abs(out : Tensor) -> Tensor
Tensor.abs_() -> Tensor
Tensor.absolute() -> Tensor
Tensor.absolute(out : Tensor) -> Tensor
Tensor.absolute_() -> Tensor
Tensor.acos() -> Tensor
Tensor.acos(out : Tensor) -> Tensor
Tensor.acos_() -> Tensor
Tensor.acosh() -> Tensor
Tensor.acosh(out : Tensor) -> Tensor
Tensor.acosh_() -> Tensor
Tensor.add(other : Tensor,
alpha : number=1) -> Tensor
Tensor.add(other : number,
alpha : number=1) -> Tensor
Tensor.add(other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.add_(other : number,
alpha : number=1) -> Tensor
Tensor.add_(other : Tensor,
alpha : number=1) -> Tensor
Tensor.addbmm(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addbmm(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.addbmm_(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addcdiv(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
Tensor.addcdiv(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1,
out : Tensor) -> Tensor
Tensor.addcdiv_(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
Tensor.addcmul(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
Tensor.addcmul(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1,
out : Tensor) -> Tensor
Tensor.addcmul_(tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
Tensor.addmm(mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addmm(mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.addmm_(mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addmv(mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addmv(mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.addmv_(mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addr(vec1 : Tensor,
vec2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.addr(vec1 : Tensor,
vec2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.addr_(vec1 : Tensor,
vec2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.align_as(other : Tensor) -> Tensor
Tensor.align_to(names : List[str]) -> Tensor
Tensor.align_to(order : List[str],
ellipsis_idx : int) -> Tensor
Tensor.all() -> Tensor
Tensor.all(dim : int,
keepdim : bool=False) -> Tensor
Tensor.all(dim : int,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.all(dim : str,
keepdim : bool=False) -> Tensor
Tensor.all(dim : str,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.allclose(other : Tensor,
rtol : float=1e-05,
atol : float=1e-08,
equal_nan : bool=False) -> bool
Tensor.amax(dim : List[int]=[],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.amax(dim : List[int]=[],
keepdim : bool=False) -> Tensor
Tensor.amin(dim : List[int]=[],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.amin(dim : List[int]=[],
keepdim : bool=False) -> Tensor
Tensor.angle() -> Tensor
Tensor.angle(out : Tensor) -> Tensor
Tensor.any() -> Tensor
Tensor.any(dim : int,
keepdim : bool=False) -> Tensor
Tensor.any(dim : int,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.any(dim : str,
keepdim : bool=False) -> Tensor
Tensor.any(dim : str,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.arccos() -> Tensor
Tensor.arccos(out : Tensor) -> Tensor
Tensor.arccos_() -> Tensor
Tensor.arccosh() -> Tensor
Tensor.arccosh(out : Tensor) -> Tensor
Tensor.arccosh_() -> Tensor
Tensor.arcsin() -> Tensor
Tensor.arcsin(out : Tensor) -> Tensor
Tensor.arcsin_() -> Tensor
Tensor.arcsinh() -> Tensor
Tensor.arcsinh(out : Tensor) -> Tensor
Tensor.arcsinh_() -> Tensor
Tensor.arctan() -> Tensor
Tensor.arctan(out : Tensor) -> Tensor
Tensor.arctan_() -> Tensor
Tensor.arctanh() -> Tensor
Tensor.arctanh(out : Tensor) -> Tensor
Tensor.arctanh_() -> Tensor
Tensor.argmax(dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.argmax(dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.argmin(dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.argmin(dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.argsort(dim : int=-1,
descending : bool=False) -> Tensor
Tensor.argsort(dim : str,
descending : bool=False) -> Tensor
Tensor.as_strided(size : List[int],
stride : List[int],
storage_offset : Optional[int]) -> Tensor
Tensor.as_strided_(size : List[int],
stride : List[int],
storage_offset : Optional[int]) -> Tensor
Tensor.asin() -> Tensor
Tensor.asin(out : Tensor) -> Tensor
Tensor.asin_() -> Tensor
Tensor.asinh() -> Tensor
Tensor.asinh(out : Tensor) -> Tensor
Tensor.asinh_() -> Tensor
Tensor.atan() -> Tensor
Tensor.atan(out : Tensor) -> Tensor
Tensor.atan2(other : Tensor) -> Tensor
Tensor.atan2(other : Tensor,
out : Tensor) -> Tensor
Tensor.atan2_(other : Tensor) -> Tensor
Tensor.atan_() -> Tensor
Tensor.atanh() -> Tensor
Tensor.atanh(out : Tensor) -> Tensor
Tensor.atanh_() -> Tensor
Tensor.backward(gradient : Optional[Tensor],
retain_graph : Optional[bool],
create_graph : bool=False) -> Tuple[]
Tensor.baddbmm(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.baddbmm(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.baddbmm_(batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.bernoulli(generator : Optional[Generator]) -> Tensor
Tensor.bernoulli(generator : Optional[Generator],
out : Tensor) -> Tensor
Tensor.bernoulli(p : float,
generator : Optional[Generator]) -> Tensor
Tensor.bernoulli_(p : Tensor,
generator : Optional[Generator]) -> Tensor
Tensor.bernoulli_(p : float=0.5,
generator : Optional[Generator]) -> Tensor
Tensor.bincount(weights : Optional[Tensor],
minlength : int=0) -> Tensor
Tensor.bitwise_and(other : Tensor,
out : Tensor) -> Tensor
Tensor.bitwise_and(other : number,
out : Tensor) -> Tensor
Tensor.bitwise_and(other : Tensor) -> Tensor
Tensor.bitwise_and(other : number) -> Tensor
Tensor.bitwise_and_(other : Tensor) -> Tensor
Tensor.bitwise_and_(other : number) -> Tensor
Tensor.bitwise_not() -> Tensor
Tensor.bitwise_not(out : Tensor) -> Tensor
Tensor.bitwise_not_() -> Tensor
Tensor.bitwise_or(other : Tensor,
out : Tensor) -> Tensor
Tensor.bitwise_or(other : number,
out : Tensor) -> Tensor
Tensor.bitwise_or(other : Tensor) -> Tensor
Tensor.bitwise_or(other : number) -> Tensor
Tensor.bitwise_or_(other : Tensor) -> Tensor
Tensor.bitwise_or_(other : number) -> Tensor
Tensor.bitwise_xor(other : Tensor,
out : Tensor) -> Tensor
Tensor.bitwise_xor(other : number,
out : Tensor) -> Tensor
Tensor.bitwise_xor(other : Tensor) -> Tensor
Tensor.bitwise_xor(other : number) -> Tensor
Tensor.bitwise_xor_(other : Tensor) -> Tensor
Tensor.bitwise_xor_(other : number) -> Tensor
Tensor.bmm(mat2 : Tensor) -> Tensor
Tensor.bmm(mat2 : Tensor,
out : Tensor) -> Tensor
Tensor.broadcast_to(size : List[int]) -> Tensor
Tensor.cauchy_(median : float=0.0,
sigma : float=1.0,
generator : Optional[Generator]) -> Tensor
Tensor.ceil() -> Tensor
Tensor.ceil(out : Tensor) -> Tensor
Tensor.ceil_() -> Tensor
Tensor.cholesky(upper : bool=False,
out : Tensor) -> Tensor
Tensor.cholesky(upper : bool=False) -> Tensor
Tensor.cholesky_inverse(upper : bool=False) -> Tensor
Tensor.cholesky_inverse(upper : bool=False,
out : Tensor) -> Tensor
Tensor.cholesky_solve(input2 : Tensor,
upper : bool=False,
out : Tensor) -> Tensor
Tensor.cholesky_solve(input2 : Tensor,
upper : bool=False) -> Tensor
Tensor.chunk(chunks : int,
dim : int=0) -> List[Tensor]
Tensor.clamp(min : Optional[number],
max : Optional[number]) -> Tensor
Tensor.clamp(min : Optional[number],
max : Optional[number],
out : Tensor) -> Tensor
Tensor.clamp_(min : Optional[number],
max : Optional[number]) -> Tensor
Tensor.clamp_max(max : number) -> Tensor
Tensor.clamp_max(max : number,
out : Tensor) -> Tensor
Tensor.clamp_max_(max : number) -> Tensor
Tensor.clamp_min(min : number) -> Tensor
Tensor.clamp_min(min : number,
out : Tensor) -> Tensor
Tensor.clamp_min_(min : number) -> Tensor
Tensor.clip(min : Optional[number],
max : Optional[number]) -> Tensor
Tensor.clip(min : Optional[number],
max : Optional[number],
out : Tensor) -> Tensor
Tensor.clip_(min : Optional[number],
max : Optional[number]) -> Tensor
Tensor.clone(memory_format : Optional[int]) -> Tensor
Tensor.coalesce() -> Tensor
Tensor.conj() -> Tensor
Tensor.conj(out : Tensor) -> Tensor
Tensor.contiguous(memory_format : int=0) -> Tensor
Tensor.copy_(src : Tensor,
non_blocking : bool=False) -> Tensor
Tensor.copy_(other : Tensor) -> Tensor
Tensor.copy_(other : int) -> Tensor
Tensor.copy_(other : float) -> Tensor
Tensor.copysign(other : Tensor) -> Tensor
Tensor.copysign(other : Tensor,
out : Tensor) -> Tensor
Tensor.copysign(other : number) -> Tensor
Tensor.copysign_(other : Tensor) -> Tensor
Tensor.copysign_(other : number) -> Tensor
Tensor.cos() -> Tensor
Tensor.cos(out : Tensor) -> Tensor
Tensor.cos_() -> Tensor
Tensor.cosh() -> Tensor
Tensor.cosh(out : Tensor) -> Tensor
Tensor.cosh_() -> Tensor
Tensor.count_nonzero(dim : List[int]) -> Tensor
Tensor.count_nonzero(dim : Optional[int]) -> Tensor
Tensor.cpu() -> Tensor
Tensor.cross(other : Tensor,
dim : Optional[int]) -> Tensor
Tensor.cross(other : Tensor,
dim : Optional[int],
out : Tensor) -> Tensor
Tensor.cuda() -> Tensor
Tensor.cummax(dim : int) -> Tuple[Tensor, Tensor]
Tensor.cummax(dim : str) -> Tuple[Tensor, Tensor]
Tensor.cummax(dim : str,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.cummax(dim : int,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.cummin(dim : int) -> Tuple[Tensor, Tensor]
Tensor.cummin(dim : str) -> Tuple[Tensor, Tensor]
Tensor.cummin(dim : str,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.cummin(dim : int,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.cumprod(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.cumprod(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.cumprod(dim : str,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.cumprod(dim : int,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.cumprod_(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.cumprod_(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.cumsum(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.cumsum(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.cumsum(dim : str,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.cumsum(dim : int,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.cumsum_(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.cumsum_(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.data() -> Tensor
Tensor.deg2rad() -> Tensor
Tensor.deg2rad(out : Tensor) -> Tensor
Tensor.deg2rad_() -> Tensor
Tensor.dense_dim() -> int
Tensor.dequantize() -> Tensor
Tensor.det() -> Tensor
Tensor.detach() -> Tensor
Tensor.detach_() -> Tensor
Tensor.diag(diagonal : int=0,
out : Tensor) -> Tensor
Tensor.diag(diagonal : int=0) -> Tensor
Tensor.diag_embed(offset : int=0,
dim1 : int=-2,
dim2 : int=-1) -> Tensor
Tensor.diagflat(offset : int=0) -> Tensor
Tensor.diagonal(offset : int=0,
dim1 : int=0,
dim2 : int=1) -> Tensor
Tensor.diagonal(outdim : str,
dim1 : str,
dim2 : str,
offset : int=0) -> Tensor
Tensor.diff(n : int=1,
dim : int=-1,
prepend : Optional[Tensor],
append : Optional[Tensor]) -> Tensor
Tensor.diff(n : int=1,
dim : int=-1,
prepend : Optional[Tensor],
append : Optional[Tensor],
out : Tensor) -> Tensor
Tensor.digamma() -> Tensor
Tensor.digamma(out : Tensor) -> Tensor
Tensor.digamma_() -> Tensor
Tensor.dim() -> int
Tensor.dist(other : Tensor,
p : number=2) -> Tensor
Tensor.div(other : Tensor) -> Tensor
Tensor.div(other : number) -> Tensor
Tensor.div(other : Tensor,
rounding_mode : str) -> Tensor
Tensor.div(other : number,
rounding_mode : str) -> Tensor
Tensor.div(other : Tensor,
out : Tensor) -> Tensor
Tensor.div(other : Tensor,
rounding_mode : str,
out : Tensor) -> Tensor
Tensor.div_(other : number) -> Tensor
Tensor.div_(other : Tensor) -> Tensor
Tensor.div_(other : Tensor,
rounding_mode : str) -> Tensor
Tensor.div_(other : number,
rounding_mode : str) -> Tensor
Tensor.divide(other : Tensor) -> Tensor
Tensor.divide(other : Tensor,
out : Tensor) -> Tensor
Tensor.divide(other : number) -> Tensor
Tensor.divide(other : Tensor,
rounding_mode : str) -> Tensor
Tensor.divide(other : Tensor,
rounding_mode : str,
out : Tensor) -> Tensor
Tensor.divide(other : number,
rounding_mode : str) -> Tensor
Tensor.divide_(other : Tensor) -> Tensor
Tensor.divide_(other : number) -> Tensor
Tensor.divide_(other : Tensor,
rounding_mode : str) -> Tensor
Tensor.divide_(other : number,
rounding_mode : str) -> Tensor
Tensor.dot(tensor : Tensor) -> Tensor
Tensor.dot(tensor : Tensor,
out : Tensor) -> Tensor
Tensor.eig(eigenvectors : bool=False,
e : Tensor,
v : Tensor) -> Tuple[Tensor, Tensor]
Tensor.eig(eigenvectors : bool=False) -> Tuple[Tensor, Tensor]
Tensor.element_size() -> int
Tensor.eq(other : Tensor) -> Tensor
Tensor.eq(other : number) -> Tensor
Tensor.eq(other : number,
out : Tensor) -> Tensor
Tensor.eq(other : Tensor,
out : Tensor) -> Tensor
Tensor.eq_(other : number) -> Tensor
Tensor.eq_(other : Tensor) -> Tensor
Tensor.equal(other : Tensor) -> bool
Tensor.erf() -> Tensor
Tensor.erf(out : Tensor) -> Tensor
Tensor.erf_() -> Tensor
Tensor.erfc() -> Tensor
Tensor.erfc(out : Tensor) -> Tensor
Tensor.erfc_() -> Tensor
Tensor.erfinv() -> Tensor
Tensor.erfinv(out : Tensor) -> Tensor
Tensor.erfinv_() -> Tensor
Tensor.exp() -> Tensor
Tensor.exp(out : Tensor) -> Tensor
Tensor.exp2(out : Tensor) -> Tensor
Tensor.exp2() -> Tensor
Tensor.exp2_() -> Tensor
Tensor.exp_() -> Tensor
Tensor.expand(size : List[int],
implicit : bool=False) -> Tensor
Tensor.expand_as(other : Tensor) -> Tensor
Tensor.expm1() -> Tensor
Tensor.expm1(out : Tensor) -> Tensor
Tensor.expm1_() -> Tensor
Tensor.exponential_(lambd : float=1.0,
generator : Optional[Generator]) -> Tensor
Tensor.fill_(value : number) -> Tensor
Tensor.fill_(value : Tensor) -> Tensor
Tensor.fill_diagonal_(fill_value : number,
wrap : bool=False) -> Tensor
Tensor.fix() -> Tensor
Tensor.fix(out : Tensor) -> Tensor
Tensor.fix_() -> Tensor
Tensor.flatten(dims : List[str],
out_dim : str) -> Tensor
Tensor.flatten(start_dim : int,
end_dim : int,
out_dim : str) -> Tensor
Tensor.flatten(start_dim : int=0,
end_dim : int=-1) -> Tensor
Tensor.flatten(start_dim : str,
end_dim : str,
out_dim : str) -> Tensor
Tensor.flip(dims : List[int]) -> Tensor
Tensor.fliplr() -> Tensor
Tensor.flipud() -> Tensor
Tensor.float_power(exponent : Tensor,
out : Tensor) -> Tensor
Tensor.float_power(exponent : Tensor) -> Tensor
Tensor.float_power(exponent : number,
out : Tensor) -> Tensor
Tensor.float_power(exponent : number) -> Tensor
Tensor.float_power_(exponent : Tensor) -> Tensor
Tensor.float_power_(exponent : number) -> Tensor
Tensor.floor() -> Tensor
Tensor.floor(out : Tensor) -> Tensor
Tensor.floor_() -> Tensor
Tensor.floor_divide(other : Tensor) -> Tensor
Tensor.floor_divide(other : number) -> Tensor
Tensor.floor_divide(other : Tensor,
out : Tensor) -> Tensor
Tensor.floor_divide_(other : number) -> Tensor
Tensor.floor_divide_(other : Tensor) -> Tensor
Tensor.fmax(other : Tensor) -> Tensor
Tensor.fmax(other : Tensor,
out : Tensor) -> Tensor
Tensor.fmin(other : Tensor) -> Tensor
Tensor.fmin(other : Tensor,
out : Tensor) -> Tensor
Tensor.fmod(other : number,
out : Tensor) -> Tensor
Tensor.fmod(other : number) -> Tensor
Tensor.fmod(other : Tensor,
out : Tensor) -> Tensor
Tensor.fmod(other : Tensor) -> Tensor
Tensor.fmod_(other : number) -> Tensor
Tensor.fmod_(other : Tensor) -> Tensor
Tensor.frac() -> Tensor
Tensor.frac(out : Tensor) -> Tensor
Tensor.frac_() -> Tensor
Tensor.gather(dim : int,
index : Tensor,
sparse_grad : bool=False,
out : Tensor) -> Tensor
Tensor.gather(dim : int,
index : Tensor,
sparse_grad : bool=False) -> Tensor
Tensor.gather(dim : str,
index : Tensor,
sparse_grad : bool=False,
out : Tensor) -> Tensor
Tensor.gather(dim : str,
index : Tensor,
sparse_grad : bool=False) -> Tensor
Tensor.gcd(other : Tensor,
out : Tensor) -> Tensor
Tensor.gcd(other : Tensor) -> Tensor
Tensor.gcd_(other : Tensor) -> Tensor
Tensor.ge(other : Tensor) -> Tensor
Tensor.ge(other : number) -> Tensor
Tensor.ge(other : number,
out : Tensor) -> Tensor
Tensor.ge(other : Tensor,
out : Tensor) -> Tensor
Tensor.ge_(other : number) -> Tensor
Tensor.ge_(other : Tensor) -> Tensor
Tensor.geometric_(p : float,
generator : Optional[Generator]) -> Tensor
Tensor.geqrf(a : Tensor,
tau : Tensor) -> Tuple[Tensor, Tensor]
Tensor.geqrf() -> Tuple[Tensor, Tensor]
Tensor.ger(vec2 : Tensor) -> Tensor
Tensor.ger(vec2 : Tensor,
out : Tensor) -> Tensor
Tensor.get_device() -> int
Tensor.greater(other : number,
out : Tensor) -> Tensor
Tensor.greater(other : number) -> Tensor
Tensor.greater(other : Tensor,
out : Tensor) -> Tensor
Tensor.greater(other : Tensor) -> Tensor
Tensor.greater_(other : number) -> Tensor
Tensor.greater_(other : Tensor) -> Tensor
Tensor.greater_equal(other : number,
out : Tensor) -> Tensor
Tensor.greater_equal(other : number) -> Tensor
Tensor.greater_equal(other : Tensor,
out : Tensor) -> Tensor
Tensor.greater_equal(other : Tensor) -> Tensor
Tensor.greater_equal_(other : number) -> Tensor
Tensor.greater_equal_(other : Tensor) -> Tensor
Tensor.gt(other : Tensor) -> Tensor
Tensor.gt(other : number) -> Tensor
Tensor.gt(other : number,
out : Tensor) -> Tensor
Tensor.gt(other : Tensor,
out : Tensor) -> Tensor
Tensor.gt_(other : number) -> Tensor
Tensor.gt_(other : Tensor) -> Tensor
Tensor.hardshrink(lambd : number=0.5) -> Tensor
Tensor.heaviside(values : Tensor,
out : Tensor) -> Tensor
Tensor.heaviside(values : Tensor) -> Tensor
Tensor.heaviside_(values : Tensor) -> Tensor
Tensor.histc(bins : int=100,
min : number=0,
max : number=0,
out : Tensor) -> Tensor
Tensor.histc(bins : int=100,
min : number=0,
max : number=0) -> Tensor
Tensor.hypot(other : Tensor) -> Tensor
Tensor.hypot(other : Tensor,
out : Tensor) -> Tensor
Tensor.hypot_(other : Tensor) -> Tensor
Tensor.i0() -> Tensor
Tensor.i0(out : Tensor) -> Tensor
Tensor.i0_() -> Tensor
Tensor.igamma(other : Tensor) -> Tensor
Tensor.igamma(other : Tensor,
out : Tensor) -> Tensor
Tensor.igamma_(other : Tensor) -> Tensor
Tensor.igammac(other : Tensor) -> Tensor
Tensor.igammac(other : Tensor,
out : Tensor) -> Tensor
Tensor.igammac_(other : Tensor) -> Tensor
Tensor.imag() -> Tensor
Tensor.index_add(dim : int,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_add(dim : str,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_add_(dim : int,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_copy(dim : int,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_copy(dim : str,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_copy_(dim : int,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_copy_(dim : str,
index : Tensor,
source : Tensor) -> Tensor
Tensor.index_fill(dim : str,
index : Tensor,
value : number) -> Tensor
Tensor.index_fill(dim : str,
index : Tensor,
value : Tensor) -> Tensor
Tensor.index_fill(dim : int,
index : Tensor,
value : number) -> Tensor
Tensor.index_fill(dim : int,
index : Tensor,
value : Tensor) -> Tensor
Tensor.index_fill_(dim : str,
index : Tensor,
value : number) -> Tensor
Tensor.index_fill_(dim : str,
index : Tensor,
value : Tensor) -> Tensor
Tensor.index_fill_(dim : int,
index : Tensor,
value : number) -> Tensor
Tensor.index_fill_(dim : int,
index : Tensor,
value : Tensor) -> Tensor
Tensor.index_put(indices : List[Optional[Tensor]],
values : Tensor,
accumulate : bool=False) -> Tensor
Tensor.index_put(indices : List[Tensor],
values : Tensor,
accumulate : bool=False) -> Tensor
Tensor.index_put_(indices : List[Optional[Tensor]],
values : Tensor,
accumulate : bool=False) -> Tensor
Tensor.index_put_(indices : List[Tensor],
values : Tensor,
accumulate : bool=False) -> Tensor
Tensor.index_select(dim : int,
index : Tensor,
out : Tensor) -> Tensor
Tensor.index_select(dim : int,
index : Tensor) -> Tensor
Tensor.index_select(dim : str,
index : Tensor,
out : Tensor) -> Tensor
Tensor.index_select(dim : str,
index : Tensor) -> Tensor
Tensor.indices() -> Tensor
Tensor.inner(other : Tensor) -> Tensor
Tensor.inner(other : Tensor,
out : Tensor) -> Tensor
Tensor.int_repr() -> Tensor
Tensor.inverse() -> Tensor
Tensor.inverse(out : Tensor) -> Tensor
Tensor.is_coalesced() -> bool
Tensor.is_complex() -> bool
Tensor.is_contiguous() -> bool
Tensor.is_distributed() -> bool
Tensor.is_floating_point() -> bool
Tensor.is_leaf() -> bool
Tensor.is_nonzero() -> bool
Tensor.is_pinned() -> bool
Tensor.is_same_size(other : Tensor) -> bool
Tensor.is_set_to(tensor : Tensor) -> bool
Tensor.is_signed() -> bool
Tensor.isclose(other : Tensor,
rtol : float=1e-05,
atol : float=1e-08,
equal_nan : bool=False) -> Tensor
Tensor.isfinite() -> Tensor
Tensor.isinf() -> Tensor
Tensor.isnan() -> Tensor
Tensor.isneginf(out : Tensor) -> Tensor
Tensor.isneginf() -> Tensor
Tensor.isposinf(out : Tensor) -> Tensor
Tensor.isposinf() -> Tensor
Tensor.isreal() -> Tensor
Tensor.istft(n_fft : int,
hop_length : Optional[int],
win_length : Optional[int],
window : Optional[Tensor],
center : bool=True,
normalized : bool=False,
onesided : Optional[bool],
length : Optional[int],
return_complex : bool=False) -> Tensor
Tensor.item() -> number
Tensor.kron(other : Tensor) -> Tensor
Tensor.kron(other : Tensor,
out : Tensor) -> Tensor
Tensor.kthvalue(k : int,
dim : int=-1,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.kthvalue(k : int,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.kthvalue(k : int,
dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.kthvalue(k : int,
dim : int=-1,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.lcm(other : Tensor,
out : Tensor) -> Tensor
Tensor.lcm(other : Tensor) -> Tensor
Tensor.lcm_(other : Tensor) -> Tensor
Tensor.ldexp(other : Tensor) -> Tensor
Tensor.ldexp(other : Tensor,
out : Tensor) -> Tensor
Tensor.ldexp_(other : Tensor) -> Tensor
Tensor.le(other : Tensor) -> Tensor
Tensor.le(other : number) -> Tensor
Tensor.le(other : number,
out : Tensor) -> Tensor
Tensor.le(other : Tensor,
out : Tensor) -> Tensor
Tensor.le_(other : number) -> Tensor
Tensor.le_(other : Tensor) -> Tensor
Tensor.lerp(end : Tensor,
weight : number,
out : Tensor) -> Tensor
Tensor.lerp(end : Tensor,
weight : number) -> Tensor
Tensor.lerp(end : Tensor,
weight : Tensor,
out : Tensor) -> Tensor
Tensor.lerp(end : Tensor,
weight : Tensor) -> Tensor
Tensor.lerp_(end : Tensor,
weight : number) -> Tensor
Tensor.lerp_(end : Tensor,
weight : Tensor) -> Tensor
Tensor.less(other : number,
out : Tensor) -> Tensor
Tensor.less(other : number) -> Tensor
Tensor.less(other : Tensor,
out : Tensor) -> Tensor
Tensor.less(other : Tensor) -> Tensor
Tensor.less_(other : number) -> Tensor
Tensor.less_(other : Tensor) -> Tensor
Tensor.less_equal(other : number,
out : Tensor) -> Tensor
Tensor.less_equal(other : number) -> Tensor
Tensor.less_equal(other : Tensor,
out : Tensor) -> Tensor
Tensor.less_equal(other : Tensor) -> Tensor
Tensor.less_equal_(other : number) -> Tensor
Tensor.less_equal_(other : Tensor) -> Tensor
Tensor.lgamma() -> Tensor
Tensor.lgamma(out : Tensor) -> Tensor
Tensor.lgamma_() -> Tensor
Tensor.log() -> Tensor
Tensor.log(out : Tensor) -> Tensor
Tensor.log10() -> Tensor
Tensor.log10(out : Tensor) -> Tensor
Tensor.log10_() -> Tensor
Tensor.log1p() -> Tensor
Tensor.log1p(out : Tensor) -> Tensor
Tensor.log1p_() -> Tensor
Tensor.log2() -> Tensor
Tensor.log2(out : Tensor) -> Tensor
Tensor.log2_() -> Tensor
Tensor.log_() -> Tensor
Tensor.log_normal_(mean : float=1.0,
std : float=2.0,
generator : Optional[Generator]) -> Tensor
Tensor.log_softmax(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.log_softmax(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.logaddexp(other : Tensor) -> Tensor
Tensor.logaddexp(other : Tensor,
out : Tensor) -> Tensor
Tensor.logaddexp2(other : Tensor) -> Tensor
Tensor.logaddexp2(other : Tensor,
out : Tensor) -> Tensor
Tensor.logcumsumexp(dim : int) -> Tensor
Tensor.logcumsumexp(dim : str) -> Tensor
Tensor.logcumsumexp(dim : str,
out : Tensor) -> Tensor
Tensor.logcumsumexp(dim : int,
out : Tensor) -> Tensor
Tensor.logdet() -> Tensor
Tensor.logical_and(other : Tensor) -> Tensor
Tensor.logical_and(other : Tensor,
out : Tensor) -> Tensor
Tensor.logical_and_(other : Tensor) -> Tensor
Tensor.logical_not() -> Tensor
Tensor.logical_not(out : Tensor) -> Tensor
Tensor.logical_not_() -> Tensor
Tensor.logical_or(other : Tensor) -> Tensor
Tensor.logical_or(other : Tensor,
out : Tensor) -> Tensor
Tensor.logical_or_(other : Tensor) -> Tensor
Tensor.logical_xor(other : Tensor) -> Tensor
Tensor.logical_xor(other : Tensor,
out : Tensor) -> Tensor
Tensor.logical_xor_(other : Tensor) -> Tensor
Tensor.logit(eps : Optional[float]) -> Tensor
Tensor.logit(eps : Optional[float],
out : Tensor) -> Tensor
Tensor.logit_(eps : Optional[float]) -> Tensor
Tensor.logsumexp(dim : List[int],
keepdim : bool=False) -> Tensor
Tensor.logsumexp(dim : List[str],
keepdim : bool=False) -> Tensor
Tensor.logsumexp(dim : List[str],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.logsumexp(dim : List[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.lstsq(A : Tensor,
X : Tensor,
qr : Tensor) -> Tuple[Tensor, Tensor]
Tensor.lstsq(A : Tensor) -> Tuple[Tensor, Tensor]
Tensor.lt(other : Tensor) -> Tensor
Tensor.lt(other : number) -> Tensor
Tensor.lt(other : number,
out : Tensor) -> Tensor
Tensor.lt(other : Tensor,
out : Tensor) -> Tensor
Tensor.lt_(other : number) -> Tensor
Tensor.lt_(other : Tensor) -> Tensor
Tensor.lu_solve(LU_data : Tensor,
LU_pivots : Tensor,
out : Tensor) -> Tensor
Tensor.lu_solve(LU_data : Tensor,
LU_pivots : Tensor) -> Tensor
Tensor.masked_fill(mask : Tensor,
value : number) -> Tensor
Tensor.masked_fill(mask : Tensor,
value : Tensor) -> Tensor
Tensor.masked_fill_(mask : Tensor,
value : number) -> Tensor
Tensor.masked_fill_(mask : Tensor,
value : Tensor) -> Tensor
Tensor.masked_scatter(mask : Tensor,
source : Tensor) -> Tensor
Tensor.masked_scatter_(mask : Tensor,
source : Tensor) -> Tensor
Tensor.masked_select(mask : Tensor) -> Tensor
Tensor.masked_select(mask : Tensor,
out : Tensor) -> Tensor
Tensor.matmul(other : Tensor) -> Tensor
Tensor.matmul(other : Tensor,
out : Tensor) -> Tensor
Tensor.matrix_exp() -> Tensor
Tensor.matrix_power(n : int) -> Tensor
Tensor.max() -> Tensor
Tensor.max(dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.max(dim : int,
keepdim : bool=False,
max : Tensor,
max_values : Tensor) -> Tuple[Tensor, Tensor]
Tensor.max(dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.max(dim : str,
keepdim : bool=False,
max : Tensor,
max_values : Tensor) -> Tuple[Tensor, Tensor]
Tensor.max(other : Tensor) -> Tensor
Tensor.max(other : Tensor,
out : Tensor) -> Tensor
Tensor.maximum(other : Tensor) -> Tensor
Tensor.maximum(other : Tensor,
out : Tensor) -> Tensor
Tensor.mean(dtype : Optional[int]) -> Tensor
Tensor.mean(dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.mean(dim : List[str],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.mean(dim : List[str],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.mean(dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.median() -> Tensor
Tensor.median(dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.median(dim : int,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.median(dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.median(dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.min() -> Tensor
Tensor.min(dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.min(dim : int,
keepdim : bool=False,
min : Tensor,
min_indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.min(dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.min(dim : str,
keepdim : bool=False,
min : Tensor,
min_indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.min(other : Tensor,
out : Tensor) -> Tensor
Tensor.min(other : Tensor) -> Tensor
Tensor.minimum(other : Tensor) -> Tensor
Tensor.minimum(other : Tensor,
out : Tensor) -> Tensor
Tensor.mm(mat2 : Tensor) -> Tensor
Tensor.mm(mat2 : Tensor,
out : Tensor) -> Tensor
Tensor.mode(dim : int=-1,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.mode(dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.mode(dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.mode(dim : int=-1,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.moveaxis(source : List[int],
destination : List[int]) -> Tensor
Tensor.moveaxis(source : int,
destination : int) -> Tensor
Tensor.movedim(source : List[int],
destination : List[int]) -> Tensor
Tensor.movedim(source : int,
destination : int) -> Tensor
Tensor.msort(out : Tensor) -> Tensor
Tensor.msort() -> Tensor
Tensor.mul(other : Tensor) -> Tensor
Tensor.mul(other : number) -> Tensor
Tensor.mul(other : Tensor,
out : Tensor) -> Tensor
Tensor.mul_(other : Tensor) -> Tensor
Tensor.mul_(other : number) -> Tensor
Tensor.multinomial(num_samples : int,
replacement : bool=False,
generator : Optional[Generator]) -> Tensor
Tensor.multinomial(num_samples : int,
replacement : bool=False,
generator : Optional[Generator],
out : Tensor) -> Tensor
Tensor.multiply(other : Tensor) -> Tensor
Tensor.multiply(other : Tensor,
out : Tensor) -> Tensor
Tensor.multiply(other : number) -> Tensor
Tensor.multiply_(other : Tensor) -> Tensor
Tensor.multiply_(other : number) -> Tensor
Tensor.mv(vec : Tensor) -> Tensor
Tensor.mv(vec : Tensor,
out : Tensor) -> Tensor
Tensor.mvlgamma(p : int) -> Tensor
Tensor.mvlgamma_(p : int) -> Tensor
Tensor.nan_to_num(nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float]) -> Tensor
Tensor.nan_to_num(nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float],
out : Tensor) -> Tensor
Tensor.nan_to_num_(nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float]) -> Tensor
Tensor.nanmedian() -> Tensor
Tensor.nanmedian(dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.nanmedian(dim : int,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.nanmedian(dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
Tensor.nanmedian(dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.nanquantile(q : float,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.nanquantile(q : float,
dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.nanquantile(q : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.nanquantile(q : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.nansum(dtype : Optional[int]) -> Tensor
Tensor.nansum(dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.nansum(dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.narrow(dim : int,
start : int,
length : int) -> Tensor
Tensor.narrow(dim : int,
start : Tensor,
length : int) -> Tensor
Tensor.narrow_copy(dim : int,
start : int,
length : int) -> Tensor
Tensor.narrow_copy(dim : int,
start : int,
length : int,
out : Tensor) -> Tensor
Tensor.ne(other : Tensor) -> Tensor
Tensor.ne(other : number) -> Tensor
Tensor.ne(other : number,
out : Tensor) -> Tensor
Tensor.ne(other : Tensor,
out : Tensor) -> Tensor
Tensor.ne_(other : number) -> Tensor
Tensor.ne_(other : Tensor) -> Tensor
Tensor.neg() -> Tensor
Tensor.neg(out : Tensor) -> Tensor
Tensor.neg_() -> Tensor
Tensor.negative() -> Tensor
Tensor.negative(out : Tensor) -> Tensor
Tensor.negative_() -> Tensor
Tensor.new_empty(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
Tensor.new_empty_strided(size : List[int],
stride : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
Tensor.new_full(size : List[int],
fill_value : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
Tensor.new_zeros(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
Tensor.nextafter(other : Tensor) -> Tensor
Tensor.nextafter(other : Tensor,
out : Tensor) -> Tensor
Tensor.nextafter_(other : Tensor) -> Tensor
Tensor.nonzero(out : Tensor) -> Tensor
Tensor.nonzero() -> Tensor
Tensor.norm(p : number=2) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[int],
keepdim : bool=False) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[str],
keepdim : bool=False) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[int],
keepdim : bool,
dtype : int,
out : Tensor) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.norm(p : Optional[number],
dtype : int) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[int],
keepdim : bool,
dtype : int) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[str],
keepdim : bool,
dtype : int) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[str],
keepdim : bool,
dtype : int,
out : Tensor) -> Tensor
Tensor.norm(p : Optional[number],
dim : List[str],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.normal_(mean : float=0.0,
std : float=1.0,
generator : Optional[Generator]) -> Tensor
Tensor.not_equal(other : number,
out : Tensor) -> Tensor
Tensor.not_equal(other : number) -> Tensor
Tensor.not_equal(other : Tensor,
out : Tensor) -> Tensor
Tensor.not_equal(other : Tensor) -> Tensor
Tensor.not_equal_(other : number) -> Tensor
Tensor.not_equal_(other : Tensor) -> Tensor
Tensor.numel() -> int
Tensor.orgqr(input2 : Tensor,
out : Tensor) -> Tensor
Tensor.orgqr(input2 : Tensor) -> Tensor
Tensor.ormqr(input2 : Tensor,
input3 : Tensor,
left : bool=True,
transpose : bool=False,
out : Tensor) -> Tensor
Tensor.ormqr(input2 : Tensor,
input3 : Tensor,
left : bool=True,
transpose : bool=False) -> Tensor
Tensor.outer(vec2 : Tensor) -> Tensor
Tensor.outer(vec2 : Tensor,
out : Tensor) -> Tensor
Tensor.output_nr() -> int
Tensor.permute(dims : List[int]) -> Tensor
Tensor.pin_memory() -> Tensor
Tensor.pinverse(rcond : float=1e-15) -> Tensor
Tensor.polygamma_(n : int) -> Tensor
Tensor.pow(exponent : Tensor) -> Tensor
Tensor.pow(exponent : number) -> Tensor
Tensor.pow(exponent : number,
out : Tensor) -> Tensor
Tensor.pow(exponent : Tensor,
out : Tensor) -> Tensor
Tensor.pow_(exponent : number) -> Tensor
Tensor.pow_(exponent : Tensor) -> Tensor
Tensor.prelu(weight : Tensor) -> Tensor
Tensor.prod(dtype : Optional[int]) -> Tensor
Tensor.prod(dim : int,
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.prod(dim : str,
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.prod(dim : str,
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.prod(dim : int,
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.put_(index : Tensor,
source : Tensor,
accumulate : bool=False) -> Tensor
Tensor.q_per_channel_axis() -> int
Tensor.q_per_channel_scales() -> Tensor
Tensor.q_per_channel_zero_points() -> Tensor
Tensor.q_scale() -> float
Tensor.q_zero_point() -> int
Tensor.qr(some : bool=True,
Q : Tensor,
R : Tensor) -> Tuple[Tensor, Tensor]
Tensor.qr(some : bool=True) -> Tuple[Tensor, Tensor]
Tensor.qscheme() -> QScheme
Tensor.quantile(q : float,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.quantile(q : float,
dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.quantile(q : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.quantile(q : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
Tensor.rad2deg() -> Tensor
Tensor.rad2deg(out : Tensor) -> Tensor
Tensor.rad2deg_() -> Tensor
Tensor.random_(from : int,
to : Optional[int],
generator : Optional[Generator]) -> Tensor
Tensor.random_(to : int,
generator : Optional[Generator]) -> Tensor
Tensor.random_(generator : Optional[Generator]) -> Tensor
Tensor.ravel() -> Tensor
Tensor.real() -> Tensor
Tensor.reciprocal() -> Tensor
Tensor.reciprocal(out : Tensor) -> Tensor
Tensor.reciprocal_() -> Tensor
Tensor.record_stream(s : Stream) -> Tuple[]
Tensor.refine_names(names : List[str]) -> Tensor
Tensor.relu() -> Tensor
Tensor.relu_() -> Tensor
Tensor.remainder(other : number,
out : Tensor) -> Tensor
Tensor.remainder(other : number) -> Tensor
Tensor.remainder(other : Tensor,
out : Tensor) -> Tensor
Tensor.remainder(other : Tensor) -> Tensor
Tensor.remainder_(other : number) -> Tensor
Tensor.remainder_(other : Tensor) -> Tensor
Tensor.rename(names : Optional[List[str]]) -> Tensor
Tensor.rename_(names : Optional[List[str]]) -> Tensor
Tensor.renorm(p : number,
dim : int,
maxnorm : number) -> Tensor
Tensor.renorm(p : number,
dim : int,
maxnorm : number,
out : Tensor) -> Tensor
Tensor.renorm_(p : number,
dim : int,
maxnorm : number) -> Tensor
Tensor.repeat(repeats : List[int]) -> Tensor
Tensor.repeat_interleave(repeats : Tensor,
dim : Optional[int]) -> Tensor
Tensor.repeat_interleave(repeats : int,
dim : Optional[int]) -> Tensor
Tensor.requires_grad_(requires_grad : bool=True) -> Tensor
Tensor.reshape(shape : List[int]) -> Tensor
Tensor.reshape_as(other : Tensor) -> Tensor
Tensor.resize_(size : List[int],
memory_format : Optional[int]) -> Tensor
Tensor.resize_as_(the_template : Tensor,
memory_format : Optional[int]) -> Tensor
Tensor.retain_grad() -> Tuple[]
Tensor.roll(shifts : List[int],
dims : List[int]=[]) -> Tensor
Tensor.rot90(k : int=1,
dims : List[int]=[0, 1]) -> Tensor
Tensor.round() -> Tensor
Tensor.round(out : Tensor) -> Tensor
Tensor.round_() -> Tensor
Tensor.rsqrt() -> Tensor
Tensor.rsqrt(out : Tensor) -> Tensor
Tensor.rsqrt_() -> Tensor
Tensor.scatter(dim : int,
index : Tensor,
src : Tensor) -> Tensor
Tensor.scatter(dim : int,
index : Tensor,
value : number) -> Tensor
Tensor.scatter(dim : str,
index : Tensor,
src : Tensor) -> Tensor
Tensor.scatter(dim : str,
index : Tensor,
value : number) -> Tensor
Tensor.scatter_(dim : int,
index : Tensor,
src : Tensor) -> Tensor
Tensor.scatter_(dim : int,
index : Tensor,
value : number) -> Tensor
Tensor.scatter_(dim : int,
index : Tensor,
src : Tensor,
reduce : str) -> Tensor
Tensor.scatter_(dim : int,
index : Tensor,
value : number,
reduce : str) -> Tensor
Tensor.scatter_add(dim : int,
index : Tensor,
src : Tensor) -> Tensor
Tensor.scatter_add(dim : str,
index : Tensor,
src : Tensor) -> Tensor
Tensor.scatter_add_(dim : int,
index : Tensor,
src : Tensor) -> Tensor
Tensor.select(dim : int,
index : int) -> Tensor
Tensor.select(dim : str,
index : int) -> Tensor
Tensor.set_(source : Storage) -> Tensor
Tensor.set_(source : Storage,
storage_offset : int,
size : List[int],
stride : List[int]=[]) -> Tensor
Tensor.set_(source : Tensor) -> Tensor
Tensor.set_() -> Tensor
Tensor.sgn(out : Tensor) -> Tensor
Tensor.sgn() -> Tensor
Tensor.sgn_() -> Tensor
Tensor.sigmoid() -> Tensor
Tensor.sigmoid(out : Tensor) -> Tensor
Tensor.sigmoid_() -> Tensor
Tensor.sign() -> Tensor
Tensor.sign(out : Tensor) -> Tensor
Tensor.sign_() -> Tensor
Tensor.signbit() -> Tensor
Tensor.signbit(out : Tensor) -> Tensor
Tensor.sin() -> Tensor
Tensor.sin(out : Tensor) -> Tensor
Tensor.sin_() -> Tensor
Tensor.sinc(out : Tensor) -> Tensor
Tensor.sinc() -> Tensor
Tensor.sinc_() -> Tensor
Tensor.sinh() -> Tensor
Tensor.sinh(out : Tensor) -> Tensor
Tensor.sinh_() -> Tensor
Tensor.size(dim : int) -> int
Tensor.size(dim : str) -> int
Tensor.size() -> List[int]
Tensor.slogdet() -> Tuple[Tensor, Tensor]
Tensor.smm(mat2 : Tensor) -> Tensor
Tensor.softmax(dim : int,
dtype : Optional[int]) -> Tensor
Tensor.softmax(dim : str,
dtype : Optional[int]) -> Tensor
Tensor.solve(A : Tensor) -> Tuple[Tensor, Tensor]
Tensor.solve(A : Tensor,
solution : Tensor,
lu : Tensor) -> Tuple[Tensor, Tensor]
Tensor.sort(dim : int=-1,
descending : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.sort(dim : int=-1,
descending : bool=False) -> Tuple[Tensor, Tensor]
Tensor.sort(dim : str,
descending : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.sort(dim : str,
descending : bool=False) -> Tuple[Tensor, Tensor]
Tensor.sparse_dim() -> int
Tensor.sparse_mask(mask : Tensor) -> Tensor
Tensor.sparse_resize_(size : List[int],
sparse_dim : int,
dense_dim : int) -> Tensor
Tensor.sparse_resize_and_clear_(size : List[int],
sparse_dim : int,
dense_dim : int) -> Tensor
Tensor.split(split_size : int,
dim : int=0) -> List[Tensor]
Tensor.split(split_sizes : List[int],
dim : int=0) -> List[Tensor]
Tensor.split_with_sizes(split_sizes : List[int],
dim : int=0) -> List[Tensor]
Tensor.sqrt() -> Tensor
Tensor.sqrt(out : Tensor) -> Tensor
Tensor.sqrt_() -> Tensor
Tensor.square() -> Tensor
Tensor.square_() -> Tensor
Tensor.squeeze() -> Tensor
Tensor.squeeze(dim : int) -> Tensor
Tensor.squeeze(dim : str) -> Tensor
Tensor.squeeze_() -> Tensor
Tensor.squeeze_(dim : int) -> Tensor
Tensor.squeeze_(dim : str) -> Tensor
Tensor.sspaddmm(mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.sspaddmm(mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
Tensor.std(unbiased : bool=True) -> Tensor
Tensor.std(dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
Tensor.std(dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
Tensor.std(dim : List[str],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.std(dim : List[int],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.stft(n_fft : int,
hop_length : Optional[int],
win_length : Optional[int],
window : Optional[Tensor],
normalized : bool=False,
onesided : Optional[bool],
return_complex : Optional[bool]) -> Tensor
Tensor.storage_offset() -> int
Tensor.stride(dim : str) -> int
Tensor.stride(dim : int) -> int
Tensor.sub(other : Tensor,
alpha : number=1) -> Tensor
Tensor.sub(other : number,
alpha : number=1) -> Tensor
Tensor.sub(other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.sub_(other : number,
alpha : number=1) -> Tensor
Tensor.sub_(other : Tensor,
alpha : number=1) -> Tensor
Tensor.subtract(other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
Tensor.subtract(other : Tensor,
alpha : number=1) -> Tensor
Tensor.subtract(other : number,
alpha : number=1) -> Tensor
Tensor.subtract_(other : Tensor,
alpha : number=1) -> Tensor
Tensor.subtract_(other : number,
alpha : number=1) -> Tensor
Tensor.sum(dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.sum(dtype : Optional[int]) -> Tensor
Tensor.sum(dim : List[str],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
Tensor.sum(dim : List[str],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.sum(dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
Tensor.sum_to_size(size : List[int]) -> Tensor
Tensor.svd(some : bool=True,
compute_uv : bool=True,
U : Tensor,
S : Tensor,
V : Tensor) -> Tuple[Tensor, Tensor, Tensor]
Tensor.svd(some : bool=True,
compute_uv : bool=True) -> Tuple[Tensor, Tensor, Tensor]
Tensor.swapaxes(axis0 : int,
axis1 : int) -> Tensor
Tensor.swapaxes_(axis0 : int,
axis1 : int) -> Tensor
Tensor.swapdims(dim0 : int,
dim1 : int) -> Tensor
Tensor.swapdims_(dim0 : int,
dim1 : int) -> Tensor
Tensor.symeig(eigenvectors : bool=False,
upper : bool=True,
e : Tensor,
V : Tensor) -> Tuple[Tensor, Tensor]
Tensor.symeig(eigenvectors : bool=False,
upper : bool=True) -> Tuple[Tensor, Tensor]
Tensor.t() -> Tensor
Tensor.t_() -> Tensor
Tensor.take(index : Tensor,
out : Tensor) -> Tensor
Tensor.take(index : Tensor) -> Tensor
Tensor.tan() -> Tensor
Tensor.tan(out : Tensor) -> Tensor
Tensor.tan_() -> Tensor
Tensor.tanh() -> Tensor
Tensor.tanh(out : Tensor) -> Tensor
Tensor.tanh_() -> Tensor
Tensor.tensor_split(sections : int,
dim : int=0) -> List[Tensor]
Tensor.tensor_split(indices : List[int],
dim : int=0) -> List[Tensor]
Tensor.tensor_split(tensor_indices_or_sections : Tensor,
dim : int=0) -> List[Tensor]
Tensor.tile(dims : List[int]) -> Tensor
Tensor.to(device : Device,
dtype : int,
non_blocking : bool=False,
copy : bool=False,
memory_format : Optional[int]) -> Tensor
Tensor.to(dtype : int,
non_blocking : bool=False,
copy : bool=False,
memory_format : Optional[int]) -> Tensor
Tensor.to(other : Tensor,
non_blocking : bool=False,
copy : bool=False,
memory_format : Optional[int]) -> Tensor
Tensor.to(dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
non_blocking : bool=False,
copy : bool=False,
memory_format : Optional[int]) -> Tensor
Tensor.to(device : Optional[Device],
dtype : Optional[int],
non_blocking : bool=False,
copy : bool=False) -> Tensor
Tensor.to(dtype : Optional[int],
non_blocking : bool=False,
copy : bool=False) -> Tensor
Tensor.to(non_blocking : bool=False,
copy : bool=False) -> Tensor
Tensor.to_dense(dtype : Optional[int]) -> Tensor
Tensor.to_mkldnn(dtype : Optional[int]) -> Tensor
Tensor.to_sparse(sparse_dim : int) -> Tensor
Tensor.to_sparse() -> Tensor
Tensor.topk(k : int,
dim : int=-1,
largest : bool=True,
sorted : bool=True,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
Tensor.topk(k : int,
dim : int=-1,
largest : bool=True,
sorted : bool=True) -> Tuple[Tensor, Tensor]
Tensor.trace() -> Tensor
Tensor.transpose(dim0 : int,
dim1 : int) -> Tensor
Tensor.transpose(dim0 : str,
dim1 : str) -> Tensor
Tensor.transpose_(dim0 : int,
dim1 : int) -> Tensor
Tensor.triangular_solve(A : Tensor,
upper : bool=True,
transpose : bool=False,
unitriangular : bool=False,
X : Tensor,
M : Tensor) -> Tuple[Tensor, Tensor]
Tensor.triangular_solve(A : Tensor,
upper : bool=True,
transpose : bool=False,
unitriangular : bool=False) -> Tuple[Tensor, Tensor]
Tensor.tril(diagonal : int=0,
out : Tensor) -> Tensor
Tensor.tril(diagonal : int=0) -> Tensor
Tensor.tril_(diagonal : int=0) -> Tensor
Tensor.triu(diagonal : int=0,
out : Tensor) -> Tensor
Tensor.triu(diagonal : int=0) -> Tensor
Tensor.triu_(diagonal : int=0) -> Tensor
Tensor.true_divide(other : number) -> Tensor
Tensor.true_divide(other : Tensor) -> Tensor
Tensor.true_divide(other : Tensor,
out : Tensor) -> Tensor
Tensor.true_divide_(other : number) -> Tensor
Tensor.true_divide_(other : Tensor) -> Tensor
Tensor.trunc() -> Tensor
Tensor.trunc(out : Tensor) -> Tensor
Tensor.trunc_() -> Tensor
Tensor.type_as(other : Tensor) -> Tensor
Tensor.unbind(dim : int=0) -> List[Tensor]
Tensor.unbind(dim : str) -> List[Tensor]
Tensor.unflatten(dim : str,
sizes : List[int],
names : List[str]) -> Tensor
Tensor.unflatten(dim : int,
sizes : List[int],
names : Optional[List[str]]) -> Tensor
Tensor.unfold(dimension : int,
size : int,
step : int) -> Tensor
Tensor.uniform_(from : float=0.0,
to : float=1.0,
generator : Optional[Generator]) -> Tensor
Tensor.unique_consecutive(return_inverse : bool=False,
return_counts : bool=False,
dim : Optional[int]) -> Tuple[Tensor, Tensor, Tensor]
Tensor.unsafe_chunk(chunks : int,
dim : int=0) -> List[Tensor]
Tensor.unsafe_split(split_size : int,
dim : int=0) -> List[Tensor]
Tensor.unsafe_split_with_sizes(split_sizes : List[int],
dim : int=0) -> List[Tensor]
Tensor.unsqueeze(dim : int) -> Tensor
Tensor.unsqueeze_(dim : int) -> Tensor
Tensor.values() -> Tensor
Tensor.var(unbiased : bool=True) -> Tensor
Tensor.var(dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
Tensor.var(dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
Tensor.var(dim : List[str],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.var(dim : List[int],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
Tensor.vdot(other : Tensor) -> Tensor
Tensor.vdot(other : Tensor,
out : Tensor) -> Tensor
Tensor.view(size : List[int]) -> Tensor
Tensor.view(dtype : int) -> Tensor
Tensor.view_as(other : Tensor) -> Tensor
Tensor.xlogy(other : Tensor) -> Tensor
Tensor.xlogy(other : Tensor,
out : Tensor) -> Tensor
Tensor.xlogy(other : number) -> Tensor
Tensor.xlogy(other : number,
out : Tensor) -> Tensor
Tensor.xlogy_(other : Tensor) -> Tensor
Tensor.xlogy_(other : number) -> Tensor
Tensor.zero_() -> Tensor
Supported PyTorch Functions¶
torch.nn.functional.adaptive_avg_pool2d(input : Tensor,
output_size : List[int]) -> Tensor
torch.nn.functional.adaptive_avg_pool3d(input : Tensor,
output_size : List[int]) -> Tensor
torch.nn.functional.adaptive_max_pool1d_with_indices(input : Tensor,
output_size : List[int],
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.adaptive_max_pool2d_with_indices(input : Tensor,
output_size : List[int],
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.adaptive_max_pool3d_with_indices(input : Tensor,
output_size : List[int],
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.affine_grid(theta : Tensor,
size : List[int],
align_corners : Optional[bool]) -> Tensor
torch.nn.functional.alpha_dropout(input : Tensor,
p : float=0.5,
training : bool=False,
inplace : bool=False) -> Tensor
torch.nn.functional.assert_int_or_pair(arg : List[int],
arg_name : str,
message : str) -> None
torch.nn.functional.batch_norm(input : Tensor,
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
weight : Optional[Tensor],
bias : Optional[Tensor],
training : bool=False,
momentum : float=0.1,
eps : float=1e-05) -> Tensor
torch.nn.functional.bilinear(input1 : Tensor,
input2 : Tensor,
weight : Tensor,
bias : Optional[Tensor]) -> Tensor
torch.nn.functional.binary_cross_entropy(input : Tensor,
target : Tensor,
weight : Optional[Tensor],
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.binary_cross_entropy_with_logits(input : Tensor,
target : Tensor,
weight : Optional[Tensor],
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean,
pos_weight : Optional[Tensor]) -> Tensor
torch.nn.functional.celu(input : Tensor,
alpha : float=1.0,
inplace : bool=False) -> Tensor
torch.nn.functional.cosine_embedding_loss(input1 : Tensor,
input2 : Tensor,
target : Tensor,
margin : float=0.0,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.cross_entropy(input : Tensor,
target : Tensor,
weight : Optional[Tensor],
size_average : Optional[bool],
ignore_index : int=-100,
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.ctc_loss(log_probs : Tensor,
targets : Tensor,
input_lengths : Tensor,
target_lengths : Tensor,
blank : int=0,
reduction : str=mean,
zero_infinity : bool=False) -> Tensor
torch.nn.functional.dropout(input : Tensor,
p : float=0.5,
training : bool=True,
inplace : bool=False) -> Tensor
torch.nn.functional.dropout2d(input : Tensor,
p : float=0.5,
training : bool=True,
inplace : bool=False) -> Tensor
torch.nn.functional.dropout3d(input : Tensor,
p : float=0.5,
training : bool=True,
inplace : bool=False) -> Tensor
torch.nn.functional.elu(input : Tensor,
alpha : float=1.0,
inplace : bool=False) -> Tensor
torch.nn.functional.embedding(input : Tensor,
weight : Tensor,
padding_idx : Optional[int],
max_norm : Optional[float],
norm_type : float=2.0,
scale_grad_by_freq : bool=False,
sparse : bool=False) -> Tensor
torch.nn.functional.embedding_bag(input : Tensor,
weight : Tensor,
offsets : Optional[Tensor],
max_norm : Optional[float],
norm_type : float=2.0,
scale_grad_by_freq : bool=False,
mode : str=mean,
sparse : bool=False,
per_sample_weights : Optional[Tensor],
include_last_offset : bool=False) -> Tensor
torch.nn.functional.feature_alpha_dropout(input : Tensor,
p : float=0.5,
training : bool=False,
inplace : bool=False) -> Tensor
torch.nn.functional.fold(input : Tensor,
output_size : List[int],
kernel_size : List[int],
dilation : List[int]=1,
padding : List[int]=0,
stride : List[int]=1) -> Tensor
torch.nn.functional.fractional_max_pool2d_with_indices(input : Tensor,
kernel_size : List[int],
output_size : Optional[List[int]],
output_ratio : Optional[List[float]],
return_indices : bool=False,
_random_samples : Optional[Tensor]) -> Tuple[Tensor, Tensor]
torch.nn.functional.fractional_max_pool3d_with_indices(input : Tensor,
kernel_size : List[int],
output_size : Optional[List[int]],
output_ratio : Optional[List[float]],
return_indices : bool=False,
_random_samples : Optional[Tensor]) -> Tuple[Tensor, Tensor]
torch.nn.functional.gelu(input : Tensor) -> Tensor
torch.nn.functional.glu(input : Tensor,
dim : int=-1) -> Tensor
torch.nn.functional.grid_sample(input : Tensor,
grid : Tensor,
mode : str=bilinear,
padding_mode : str=zeros,
align_corners : Optional[bool]) -> Tensor
torch.nn.functional.group_norm(input : Tensor,
num_groups : int,
weight : Optional[Tensor],
bias : Optional[Tensor],
eps : float=1e-05) -> Tensor
torch.nn.functional.gumbel_softmax(logits : Tensor,
tau : float=1.0,
hard : bool=False,
eps : float=1e-10,
dim : int=-1) -> Tensor
torch.nn.functional.hardshrink(input : Tensor,
lambd : float=0.5) -> Tensor
torch.nn.functional.hardsigmoid(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.hardswish(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.hardtanh(input : Tensor,
min_val : float=-1.0,
max_val : float=1.0,
inplace : bool=False) -> Tensor
torch.nn.functional.hinge_embedding_loss(input : Tensor,
target : Tensor,
margin : float=1.0,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.instance_norm(input : Tensor,
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
weight : Optional[Tensor],
bias : Optional[Tensor],
use_input_stats : bool=True,
momentum : float=0.1,
eps : float=1e-05) -> Tensor
torch.nn.functional.kl_div(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean,
log_target : bool=False) -> Tensor
torch.nn.functional.l1_loss(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.layer_norm(input : Tensor,
normalized_shape : List[int],
weight : Optional[Tensor],
bias : Optional[Tensor],
eps : float=1e-05) -> Tensor
torch.nn.functional.leaky_relu(input : Tensor,
negative_slope : float=0.01,
inplace : bool=False) -> Tensor
torch.nn.functional.linear(input : Tensor,
weight : Tensor,
bias : Optional[Tensor]) -> Tensor
torch.nn.functional.local_response_norm(input : Tensor,
size : int,
alpha : float=0.0001,
beta : float=0.75,
k : float=1.0) -> Tensor
torch.nn.functional.log_softmax(input : Tensor,
dim : Optional[int],
_stacklevel : int=3,
dtype : Optional[int]) -> Tensor
torch.nn.functional.lp_pool1d(input : Tensor,
norm_type : float,
kernel_size : int,
stride : Optional[List[int]],
ceil_mode : bool=False) -> Tensor
torch.nn.functional.lp_pool2d(input : Tensor,
norm_type : float,
kernel_size : int,
stride : Optional[List[int]],
ceil_mode : bool=False) -> Tensor
torch.nn.functional.margin_ranking_loss(input1 : Tensor,
input2 : Tensor,
target : Tensor,
margin : float=0.0,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.max_pool1d_with_indices(input : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
dilation : List[int]=1,
ceil_mode : bool=False,
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.max_pool2d_with_indices(input : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
dilation : List[int]=1,
ceil_mode : bool=False,
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.max_pool3d_with_indices(input : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
dilation : List[int]=1,
ceil_mode : bool=False,
return_indices : bool=False) -> Tuple[Tensor, Tensor]
torch.nn.functional.max_unpool1d(input : Tensor,
indices : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
output_size : Optional[List[int]]) -> Tensor
torch.nn.functional.max_unpool2d(input : Tensor,
indices : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
output_size : Optional[List[int]]) -> Tensor
torch.nn.functional.max_unpool3d(input : Tensor,
indices : Tensor,
kernel_size : List[int],
stride : Optional[List[int]],
padding : List[int]=0,
output_size : Optional[List[int]]) -> Tensor
torch.nn.functional.mse_loss(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.multi_head_attention_forward(query : Tensor,
key : Tensor,
value : Tensor,
embed_dim_to_check : int,
num_heads : int,
in_proj_weight : Tensor,
in_proj_bias : Tensor,
bias_k : Optional[Tensor],
bias_v : Optional[Tensor],
add_zero_attn : bool,
dropout_p : float,
out_proj_weight : Tensor,
out_proj_bias : Tensor,
training : bool=True,
key_padding_mask : Optional[Tensor],
need_weights : bool=True,
attn_mask : Optional[Tensor],
use_separate_proj_weight : bool=False,
q_proj_weight : Optional[Tensor],
k_proj_weight : Optional[Tensor],
v_proj_weight : Optional[Tensor],
static_k : Optional[Tensor],
static_v : Optional[Tensor]) -> Tuple[Tensor, Optional[Tensor]]
torch.nn.functional.multi_margin_loss(input : Tensor,
target : Tensor,
p : int=1,
margin : float=1.0,
weight : Optional[Tensor],
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.multilabel_margin_loss(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.multilabel_soft_margin_loss(input : Tensor,
target : Tensor,
weight : Optional[Tensor],
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.nll_loss(input : Tensor,
target : Tensor,
weight : Optional[Tensor],
size_average : Optional[bool],
ignore_index : int=-100,
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.normalize(input : Tensor,
p : float=2.0,
dim : int=1,
eps : float=1e-12,
out : Optional[Tensor]) -> Tensor
torch.nn.functional.pad(input : Tensor,
pad : List[int],
mode : str=constant,
value : float=0.0) -> Tensor
torch.nn.functional.pairwise_distance(x1 : Tensor,
x2 : Tensor,
p : float=2.0,
eps : float=1e-06,
keepdim : bool=False) -> Tensor
torch.nn.functional.poisson_nll_loss(input : Tensor,
target : Tensor,
log_input : bool=True,
full : bool=False,
size_average : Optional[bool],
eps : float=1e-08,
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.prelu(input : Tensor,
weight : Tensor) -> Tensor
torch.nn.functional.relu(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.relu6(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.rrelu(input : Tensor,
lower : float=0.125,
upper : float=0.3333333333333333,
training : bool=False,
inplace : bool=False) -> Tensor
torch.nn.functional.selu(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.sigmoid(input : Tensor) -> Tensor
torch.nn.functional.silu(input : Tensor,
inplace : bool=False) -> Tensor
torch.nn.functional.smooth_l1_loss(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean,
beta : float=1.0) -> Tensor
torch.nn.functional.soft_margin_loss(input : Tensor,
target : Tensor,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.softmax(input : Tensor,
dim : Optional[int],
_stacklevel : int=3,
dtype : Optional[int]) -> Tensor
torch.nn.functional.softmin(input : Tensor,
dim : Optional[int],
_stacklevel : int=3,
dtype : Optional[int]) -> Tensor
torch.nn.functional.softsign(input : Tensor) -> Tensor
torch.nn.functional.tanh(input : Tensor) -> Tensor
torch.nn.functional.tanhshrink(input : Tensor) -> Tensor
torch.nn.functional.threshold(input : Tensor,
threshold : float,
value : float,
inplace : bool=False) -> Tensor
torch.nn.functional.triplet_margin_loss(anchor : Tensor,
positive : Tensor,
negative : Tensor,
margin : float=1.0,
p : float=2.0,
eps : float=1e-06,
swap : bool=False,
size_average : Optional[bool],
reduce : Optional[bool],
reduction : str=mean) -> Tensor
torch.nn.functional.unfold(input : Tensor,
kernel_size : List[int],
dilation : List[int]=1,
padding : List[int]=0,
stride : List[int]=1) -> Tensor
torch.Size(sizes : List[int]) -> List[int]
torch.abs(self : Tensor) -> Tensor
torch.abs(self : Tensor,
out : Tensor) -> Tensor
torch.abs_(self : Tensor) -> Tensor
torch.absolute(self : Tensor) -> Tensor
torch.absolute(self : Tensor,
out : Tensor) -> Tensor
torch.acos(self : Tensor) -> Tensor
torch.acos(self : Tensor,
out : Tensor) -> Tensor
torch.acos(a : int) -> float
torch.acos(a : float) -> float
torch.acos(a : number) -> number
torch.acos_(self : Tensor) -> Tensor
torch.acosh(self : Tensor) -> Tensor
torch.acosh(self : Tensor,
out : Tensor) -> Tensor
torch.acosh(a : int) -> float
torch.acosh(a : float) -> float
torch.acosh(a : number) -> number
torch.acosh_(self : Tensor) -> Tensor
torch.adaptive_avg_pool1d(self : Tensor,
output_size : List[int]) -> Tensor
torch.adaptive_max_pool1d(self : Tensor,
output_size : List[int]) -> Tuple[Tensor, Tensor]
torch.add(self : Tensor,
other : Tensor,
alpha : number=1) -> Tensor
torch.add(self : Tensor,
other : number,
alpha : number=1) -> Tensor
torch.add(self : Tensor,
other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
torch.add(a : List[t],
b : List[t]) -> List[t]
torch.add(a : str,
b : str) -> str
torch.add(a : int,
b : int) -> int
torch.add(a : float,
b : float) -> float
torch.add(a : int,
b : float) -> float
torch.add(a : float,
b : int) -> float
torch.add(a : number,
b : number) -> number
torch.addbmm(self : Tensor,
batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.addbmm(self : Tensor,
batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.addcdiv(self : Tensor,
tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
torch.addcdiv(self : Tensor,
tensor1 : Tensor,
tensor2 : Tensor,
value : number=1,
out : Tensor) -> Tensor
torch.addcmul(self : Tensor,
tensor1 : Tensor,
tensor2 : Tensor,
value : number=1) -> Tensor
torch.addcmul(self : Tensor,
tensor1 : Tensor,
tensor2 : Tensor,
value : number=1,
out : Tensor) -> Tensor
torch.addmm(self : Tensor,
mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.addmm(self : Tensor,
mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.addmv(self : Tensor,
mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.addmv(self : Tensor,
mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.addmv_(self : Tensor,
mat : Tensor,
vec : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.addr(self : Tensor,
vec1 : Tensor,
vec2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.addr(self : Tensor,
vec1 : Tensor,
vec2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.affine_grid_generator(theta : Tensor,
size : List[int],
align_corners : bool) -> Tensor
torch.align_tensors(tensors : List[Tensor]) -> List[Tensor]
torch.all(self : Tensor) -> Tensor
torch.all(self : Tensor,
dim : int,
keepdim : bool=False) -> Tensor
torch.all(self : Tensor,
dim : int,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.all(self : Tensor,
dim : str,
keepdim : bool=False) -> Tensor
torch.all(self : Tensor,
dim : str,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.all(self : List[int]) -> bool
torch.all(self : List[float]) -> bool
torch.all(self : List[bool]) -> bool
torch.allclose(self : Tensor,
other : Tensor,
rtol : float=1e-05,
atol : float=1e-08,
equal_nan : bool=False) -> bool
torch.alpha_dropout(input : Tensor,
p : float,
train : bool) -> Tensor
torch.alpha_dropout_(self : Tensor,
p : float,
train : bool) -> Tensor
torch.amax(self : Tensor,
dim : List[int]=[],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.amax(self : Tensor,
dim : List[int]=[],
keepdim : bool=False) -> Tensor
torch.amin(self : Tensor,
dim : List[int]=[],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.amin(self : Tensor,
dim : List[int]=[],
keepdim : bool=False) -> Tensor
torch.angle(self : Tensor) -> Tensor
torch.angle(self : Tensor,
out : Tensor) -> Tensor
torch.any(self : Tensor) -> Tensor
torch.any(self : Tensor,
dim : int,
keepdim : bool=False) -> Tensor
torch.any(self : Tensor,
dim : int,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.any(self : Tensor,
dim : str,
keepdim : bool=False) -> Tensor
torch.any(self : Tensor,
dim : str,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.arange(end : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.arange(start : number,
end : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.arange(start : number,
end : number,
step : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.arange(start : number,
end : number,
step : number=1,
out : Tensor) -> Tensor
torch.arange(end : number,
out : Tensor) -> Tensor
torch.arccos(self : Tensor) -> Tensor
torch.arccos(self : Tensor,
out : Tensor) -> Tensor
torch.arccos_(self : Tensor) -> Tensor
torch.arccosh(self : Tensor) -> Tensor
torch.arccosh(self : Tensor,
out : Tensor) -> Tensor
torch.arccosh_(self : Tensor) -> Tensor
torch.arcsin(self : Tensor) -> Tensor
torch.arcsin(self : Tensor,
out : Tensor) -> Tensor
torch.arcsin_(self : Tensor) -> Tensor
torch.arcsinh(self : Tensor) -> Tensor
torch.arcsinh(self : Tensor,
out : Tensor) -> Tensor
torch.arcsinh_(self : Tensor) -> Tensor
torch.arctan(self : Tensor) -> Tensor
torch.arctan(self : Tensor,
out : Tensor) -> Tensor
torch.arctan_(self : Tensor) -> Tensor
torch.arctanh(self : Tensor) -> Tensor
torch.arctanh(self : Tensor,
out : Tensor) -> Tensor
torch.arctanh_(self : Tensor) -> Tensor
torch.argmax(self : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.argmax(self : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.argmin(self : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.argmin(self : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.argsort(self : Tensor,
dim : int=-1,
descending : bool=False) -> Tensor
torch.argsort(self : Tensor,
dim : str,
descending : bool=False) -> Tensor
torch.as_strided(self : Tensor,
size : List[int],
stride : List[int],
storage_offset : Optional[int]) -> Tensor
torch.as_strided_(self : Tensor,
size : List[int],
stride : List[int],
storage_offset : Optional[int]) -> Tensor
torch.as_tensor(t : float,
dtype : Optional[int],
device : Optional[Device]) -> Tensor
torch.as_tensor(t : int,
dtype : Optional[int],
device : Optional[Device]) -> Tensor
torch.as_tensor(t : bool,
dtype : Optional[int],
device : Optional[Device]) -> Tensor
torch.as_tensor(data : Tensor,
dtype : Optional[int],
device : Optional[Device]) -> Tensor
torch.as_tensor(data : List[t],
dtype : Optional[int],
device : Optional[Device]) -> Tensor
torch.asin(self : Tensor) -> Tensor
torch.asin(self : Tensor,
out : Tensor) -> Tensor
torch.asin(a : int) -> float
torch.asin(a : float) -> float
torch.asin(a : number) -> number
torch.asin_(self : Tensor) -> Tensor
torch.asinh(self : Tensor) -> Tensor
torch.asinh(self : Tensor,
out : Tensor) -> Tensor
torch.asinh(a : int) -> float
torch.asinh(a : float) -> float
torch.asinh(a : number) -> number
torch.asinh_(self : Tensor) -> Tensor
torch.atan(self : Tensor) -> Tensor
torch.atan(self : Tensor,
out : Tensor) -> Tensor
torch.atan(a : int) -> float
torch.atan(a : float) -> float
torch.atan(a : number) -> number
torch.atan2(self : Tensor,
other : Tensor) -> Tensor
torch.atan2(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.atan2(a : int,
b : int) -> float
torch.atan2(a : float,
b : float) -> float
torch.atan2(a : int,
b : float) -> float
torch.atan2(a : float,
b : int) -> float
torch.atan2(a : number,
b : number) -> float
torch.atan_(self : Tensor) -> Tensor
torch.atanh(self : Tensor) -> Tensor
torch.atanh(self : Tensor,
out : Tensor) -> Tensor
torch.atanh(a : int) -> float
torch.atanh(a : float) -> float
torch.atanh(a : number) -> number
torch.atanh_(self : Tensor) -> Tensor
torch.atleast_1d(self : Tensor) -> Tensor
torch.atleast_1d(tensors : List[Tensor]) -> List[Tensor]
torch.atleast_2d(self : Tensor) -> Tensor
torch.atleast_2d(tensors : List[Tensor]) -> List[Tensor]
torch.atleast_3d(self : Tensor) -> Tensor
torch.atleast_3d(tensors : List[Tensor]) -> List[Tensor]
torch.avg_pool1d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0],
ceil_mode : bool=False,
count_include_pad : bool=True) -> Tensor
torch.baddbmm(self : Tensor,
batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.baddbmm(self : Tensor,
batch1 : Tensor,
batch2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.bartlett_window(window_length : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.bartlett_window(window_length : int,
periodic : bool,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.batch_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
training : bool,
momentum : float,
eps : float,
cudnn_enabled : bool) -> Tensor
torch.batch_norm_backward_elemt(grad_out : Tensor,
input : Tensor,
mean : Tensor,
invstd : Tensor,
weight : Optional[Tensor],
mean_dy : Tensor,
mean_dy_xmu : Tensor) -> Tensor
torch.batch_norm_backward_reduce(grad_out : Tensor,
input : Tensor,
mean : Tensor,
invstd : Tensor,
weight : Optional[Tensor],
input_g : bool,
weight_g : bool,
bias_g : bool) -> Tuple[Tensor, Tensor, Tensor, Tensor]
torch.batch_norm_elemt(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
mean : Tensor,
invstd : Tensor,
eps : float) -> Tensor
torch.batch_norm_elemt(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
mean : Tensor,
invstd : Tensor,
eps : float,
out : Tensor) -> Tensor
torch.batch_norm_gather_stats(input : Tensor,
mean : Tensor,
invstd : Tensor,
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
momentum : float,
eps : float,
count : int) -> Tuple[Tensor, Tensor]
torch.batch_norm_gather_stats_with_counts(input : Tensor,
mean : Tensor,
invstd : Tensor,
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
momentum : float,
eps : float,
counts : Tensor) -> Tuple[Tensor, Tensor]
torch.batch_norm_stats(input : Tensor,
eps : float) -> Tuple[Tensor, Tensor]
torch.batch_norm_update_stats(input : Tensor,
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
momentum : float) -> Tuple[Tensor, Tensor]
torch.bernoulli(self : Tensor,
generator : Optional[Generator]) -> Tensor
torch.bernoulli(self : Tensor,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.bernoulli(self : Tensor,
p : float,
generator : Optional[Generator]) -> Tensor
torch.bilinear(input1 : Tensor,
input2 : Tensor,
weight : Tensor,
bias : Optional[Tensor]) -> Tensor
torch.binary_cross_entropy_with_logits(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
pos_weight : Optional[Tensor],
reduction : int=1) -> Tensor
torch.bincount(self : Tensor,
weights : Optional[Tensor],
minlength : int=0) -> Tensor
torch.binomial(count : Tensor,
prob : Tensor,
generator : Optional[Generator]) -> Tensor
torch.bitwise_and(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.bitwise_and(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.bitwise_and(self : Tensor,
other : Tensor) -> Tensor
torch.bitwise_and(self : Tensor,
other : number) -> Tensor
torch.bitwise_not(self : Tensor) -> Tensor
torch.bitwise_not(self : Tensor,
out : Tensor) -> Tensor
torch.bitwise_or(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.bitwise_or(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.bitwise_or(self : Tensor,
other : Tensor) -> Tensor
torch.bitwise_or(self : Tensor,
other : number) -> Tensor
torch.bitwise_xor(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.bitwise_xor(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.bitwise_xor(self : Tensor,
other : Tensor) -> Tensor
torch.bitwise_xor(self : Tensor,
other : number) -> Tensor
torch.blackman_window(window_length : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.blackman_window(window_length : int,
periodic : bool,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.block_diag(tensors : List[Tensor]) -> Tensor
torch.bmm(self : Tensor,
mat2 : Tensor) -> Tensor
torch.bmm(self : Tensor,
mat2 : Tensor,
out : Tensor) -> Tensor
torch.broadcast_tensors(tensors : List[Tensor]) -> List[Tensor]
torch.broadcast_to(self : Tensor,
size : List[int]) -> Tensor
torch.bucketize(self : Tensor,
boundaries : Tensor,
out_int32 : bool=False,
right : bool=False) -> Tensor
torch.bucketize(self : Tensor,
boundaries : Tensor,
out_int32 : bool=False,
right : bool=False,
out : Tensor) -> Tensor
torch.bucketize(self : number,
boundaries : Tensor,
out_int32 : bool=False,
right : bool=False) -> Tensor
torch.can_cast(from : int,
to : int) -> bool
torch.cartesian_prod(tensors : List[Tensor]) -> Tensor
torch.cat(tensors : List[Tensor],
dim : int=0) -> Tensor
torch.cat(tensors : List[Tensor],
dim : str) -> Tensor
torch.cat(tensors : List[Tensor],
dim : str,
out : Tensor) -> Tensor
torch.cat(tensors : List[Tensor],
dim : int=0,
out : Tensor) -> Tensor
torch.ceil(self : Tensor) -> Tensor
torch.ceil(self : Tensor,
out : Tensor) -> Tensor
torch.ceil(a : int) -> int
torch.ceil(a : float) -> int
torch.ceil(a : number) -> number
torch.ceil_(self : Tensor) -> Tensor
torch.celu(self : Tensor,
alpha : number=1.0) -> Tensor
torch.celu_(self : Tensor,
alpha : number=1.0) -> Tensor
torch.chain_matmul(matrices : List[Tensor]) -> Tensor
torch.channel_shuffle(self : Tensor,
groups : int) -> Tensor
torch.cholesky(self : Tensor,
upper : bool=False,
out : Tensor) -> Tensor
torch.cholesky(self : Tensor,
upper : bool=False) -> Tensor
torch.cholesky_inverse(self : Tensor,
upper : bool=False) -> Tensor
torch.cholesky_inverse(self : Tensor,
upper : bool=False,
out : Tensor) -> Tensor
torch.cholesky_solve(self : Tensor,
input2 : Tensor,
upper : bool=False,
out : Tensor) -> Tensor
torch.cholesky_solve(self : Tensor,
input2 : Tensor,
upper : bool=False) -> Tensor
torch.choose_qparams_optimized(input : Tensor,
numel : int,
n_bins : int,
ratio : float,
bit_width : int) -> Tuple[Tensor, Tensor]
torch.chunk(self : Tensor,
chunks : int,
dim : int=0) -> List[Tensor]
torch.clamp(self : Tensor,
min : Optional[number],
max : Optional[number]) -> Tensor
torch.clamp(self : Tensor,
min : Optional[number],
max : Optional[number],
out : Tensor) -> Tensor
torch.clamp_(self : Tensor,
min : Optional[number],
max : Optional[number]) -> Tensor
torch.clamp_max(self : Tensor,
max : number) -> Tensor
torch.clamp_max(self : Tensor,
max : number,
out : Tensor) -> Tensor
torch.clamp_max_(self : Tensor,
max : number) -> Tensor
torch.clamp_min(self : Tensor,
min : number) -> Tensor
torch.clamp_min(self : Tensor,
min : number,
out : Tensor) -> Tensor
torch.clamp_min_(self : Tensor,
min : number) -> Tensor
torch.clip(self : Tensor,
min : Optional[number],
max : Optional[number]) -> Tensor
torch.clip(self : Tensor,
min : Optional[number],
max : Optional[number],
out : Tensor) -> Tensor
torch.clip_(self : Tensor,
min : Optional[number],
max : Optional[number]) -> Tensor
torch.clone(self : Tensor,
memory_format : Optional[int]) -> Tensor
torch.column_stack(tensors : List[Tensor]) -> Tensor
torch.column_stack(tensors : List[Tensor],
out : Tensor) -> Tensor
torch.combinations(self : Tensor,
r : int=2,
with_replacement : bool=False) -> Tensor
torch.complex(real : Tensor,
imag : Tensor,
out : Tensor) -> Tensor
torch.complex(real : Tensor,
imag : Tensor) -> Tensor
torch.conj(self : Tensor) -> Tensor
torch.conj(self : Tensor,
out : Tensor) -> Tensor
torch.constant_pad_nd(self : Tensor,
pad : List[int],
value : number=0) -> Tensor
torch.conv1d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1],
padding : List[int]=[0],
dilation : List[int]=[1],
groups : int=1) -> Tensor
torch.conv2d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
groups : int=1) -> Tensor
torch.conv3d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
groups : int=1) -> Tensor
torch.conv_tbc(self : Tensor,
weight : Tensor,
bias : Tensor,
pad : int=0) -> Tensor
torch.conv_transpose1d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1],
padding : List[int]=[0],
output_padding : List[int]=[0],
groups : int=1,
dilation : List[int]=[1]) -> Tensor
torch.conv_transpose2d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
output_padding : List[int]=[0, 0],
groups : int=1,
dilation : List[int]=[1, 1]) -> Tensor
torch.conv_transpose3d(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
output_padding : List[int]=[0, 0, 0],
groups : int=1,
dilation : List[int]=[1, 1, 1]) -> Tensor
torch.convolution(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
stride : List[int],
padding : List[int],
dilation : List[int],
transposed : bool,
output_padding : List[int],
groups : int) -> Tensor
torch.copysign(self : Tensor,
other : Tensor) -> Tensor
torch.copysign(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.copysign(self : Tensor,
other : number) -> Tensor
torch.copysign(a : int,
b : int) -> float
torch.copysign(a : float,
b : float) -> float
torch.copysign(a : int,
b : float) -> float
torch.copysign(a : float,
b : int) -> float
torch.copysign(a : number,
b : number) -> float
torch.cos(self : Tensor) -> Tensor
torch.cos(self : Tensor,
out : Tensor) -> Tensor
torch.cos(a : int) -> float
torch.cos(a : float) -> float
torch.cos(a : number) -> number
torch.cos_(self : Tensor) -> Tensor
torch.cosh(self : Tensor) -> Tensor
torch.cosh(self : Tensor,
out : Tensor) -> Tensor
torch.cosh(a : int) -> float
torch.cosh(a : float) -> float
torch.cosh(a : number) -> number
torch.cosh_(self : Tensor) -> Tensor
torch.cosine_embedding_loss(input1 : Tensor,
input2 : Tensor,
target : Tensor,
margin : float=0.0,
reduction : int=1) -> Tensor
torch.cosine_similarity(x1 : Tensor,
x2 : Tensor,
dim : int=1,
eps : float=1e-08) -> Tensor
torch.count_nonzero(self : Tensor,
dim : List[int]) -> Tensor
torch.count_nonzero(self : Tensor,
dim : Optional[int]) -> Tensor
torch.cross(self : Tensor,
other : Tensor,
dim : Optional[int]) -> Tensor
torch.cross(self : Tensor,
other : Tensor,
dim : Optional[int],
out : Tensor) -> Tensor
torch.ctc_loss(log_probs : Tensor,
targets : Tensor,
input_lengths : List[int],
target_lengths : List[int],
blank : int=0,
reduction : int=1,
zero_infinity : bool=False) -> Tensor
torch.ctc_loss(log_probs : Tensor,
targets : Tensor,
input_lengths : Tensor,
target_lengths : Tensor,
blank : int=0,
reduction : int=1,
zero_infinity : bool=False) -> Tensor
torch.cudnn_affine_grid_generator(theta : Tensor,
N : int,
C : int,
H : int,
W : int) -> Tensor
torch.cudnn_batch_norm(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
training : bool,
exponential_average_factor : float,
epsilon : float) -> Tuple[Tensor, Tensor, Tensor, Tensor]
torch.cudnn_convolution(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.cudnn_convolution(self : Tensor,
weight : Tensor,
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.cudnn_convolution(self : Tensor,
weight : Tensor,
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool,
allow_tf32 : bool) -> Tensor
torch.cudnn_convolution_transpose(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
output_padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.cudnn_convolution_transpose(self : Tensor,
weight : Tensor,
padding : List[int],
output_padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.cudnn_convolution_transpose(self : Tensor,
weight : Tensor,
padding : List[int],
output_padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool,
allow_tf32 : bool) -> Tensor
torch.cudnn_grid_sampler(self : Tensor,
grid : Tensor) -> Tensor
torch.cudnn_is_acceptable(self : Tensor) -> bool
torch.cummax(self : Tensor,
dim : int) -> Tuple[Tensor, Tensor]
torch.cummax(self : Tensor,
dim : str) -> Tuple[Tensor, Tensor]
torch.cummax(self : Tensor,
dim : str,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.cummax(self : Tensor,
dim : int,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.cummin(self : Tensor,
dim : int) -> Tuple[Tensor, Tensor]
torch.cummin(self : Tensor,
dim : str) -> Tuple[Tensor, Tensor]
torch.cummin(self : Tensor,
dim : str,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.cummin(self : Tensor,
dim : int,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.cumprod(self : Tensor,
dim : int,
dtype : Optional[int]) -> Tensor
torch.cumprod(self : Tensor,
dim : str,
dtype : Optional[int]) -> Tensor
torch.cumprod(self : Tensor,
dim : str,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.cumprod(self : Tensor,
dim : int,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.cumsum(self : Tensor,
dim : int,
dtype : Optional[int]) -> Tensor
torch.cumsum(self : Tensor,
dim : str,
dtype : Optional[int]) -> Tensor
torch.cumsum(self : Tensor,
dim : str,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.cumsum(self : Tensor,
dim : int,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.deg2rad(self : Tensor) -> Tensor
torch.deg2rad(self : Tensor,
out : Tensor) -> Tensor
torch.deg2rad_(self : Tensor) -> Tensor
torch.dequantize(self : Tensor) -> Tensor
torch.dequantize(tensors : List[Tensor]) -> List[Tensor]
torch.dequantize(qtensor : Tensor) -> Tensor
torch.dequantize(qtensors : List[Tensor]) -> List[Tensor]
torch.dequantize(tensors : Any) -> Any
torch.det(self : Tensor) -> Tensor
torch.detach(self : Tensor) -> Tensor
torch.detach_(self : Tensor) -> Tensor
torch.device(a : str) -> Device
torch.diag(self : Tensor,
diagonal : int=0,
out : Tensor) -> Tensor
torch.diag(self : Tensor,
diagonal : int=0) -> Tensor
torch.diag_embed(self : Tensor,
offset : int=0,
dim1 : int=-2,
dim2 : int=-1) -> Tensor
torch.diagflat(self : Tensor,
offset : int=0) -> Tensor
torch.diagonal(self : Tensor,
offset : int=0,
dim1 : int=0,
dim2 : int=1) -> Tensor
torch.diagonal(self : Tensor,
outdim : str,
dim1 : str,
dim2 : str,
offset : int=0) -> Tensor
torch.diff(self : Tensor,
n : int=1,
dim : int=-1,
prepend : Optional[Tensor],
append : Optional[Tensor]) -> Tensor
torch.diff(self : Tensor,
n : int=1,
dim : int=-1,
prepend : Optional[Tensor],
append : Optional[Tensor],
out : Tensor) -> Tensor
torch.digamma(self : Tensor) -> Tensor
torch.digamma(self : Tensor,
out : Tensor) -> Tensor
torch.dist(self : Tensor,
other : Tensor,
p : number=2) -> Tensor
torch.div(self : Tensor,
other : Tensor) -> Tensor
torch.div(self : Tensor,
other : number) -> Tensor
torch.div(self : Tensor,
other : Tensor,
rounding_mode : str) -> Tensor
torch.div(self : Tensor,
other : number,
rounding_mode : str) -> Tensor
torch.div(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.div(self : Tensor,
other : Tensor,
rounding_mode : str,
out : Tensor) -> Tensor
torch.div(a : int,
b : int) -> float
torch.div(a : float,
b : float) -> float
torch.div(a : number,
b : number) -> float
torch.divide(self : Tensor,
other : Tensor) -> Tensor
torch.divide(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.divide(self : Tensor,
other : number) -> Tensor
torch.divide(self : Tensor,
other : Tensor,
rounding_mode : str) -> Tensor
torch.divide(self : Tensor,
other : Tensor,
rounding_mode : str,
out : Tensor) -> Tensor
torch.divide(self : Tensor,
other : number,
rounding_mode : str) -> Tensor
torch.dot(self : Tensor,
tensor : Tensor) -> Tensor
torch.dot(self : Tensor,
tensor : Tensor,
out : Tensor) -> Tensor
torch.dropout(input : Tensor,
p : float,
train : bool) -> Tensor
torch.dropout_(self : Tensor,
p : float,
train : bool) -> Tensor
torch.dstack(tensors : List[Tensor]) -> Tensor
torch.dstack(tensors : List[Tensor],
out : Tensor) -> Tensor
torch.eig(self : Tensor,
eigenvectors : bool=False,
e : Tensor,
v : Tensor) -> Tuple[Tensor, Tensor]
torch.eig(self : Tensor,
eigenvectors : bool=False) -> Tuple[Tensor, Tensor]
torch.einsum(equation : str,
tensors : List[Tensor]) -> Tensor
torch.embedding(weight : Tensor,
indices : Tensor,
padding_idx : int=-1,
scale_grad_by_freq : bool=False,
sparse : bool=False) -> Tensor
torch.embedding_bag(weight : Tensor,
indices : Tensor,
offsets : Tensor,
scale_grad_by_freq : bool=False,
mode : int=0,
sparse : bool=False,
per_sample_weights : Optional[Tensor],
include_last_offset : bool=False) -> Tuple[Tensor, Tensor, Tensor, Tensor]
torch.embedding_renorm_(self : Tensor,
indices : Tensor,
max_norm : float,
norm_type : float) -> Tensor
torch.empty(size : List[int],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.empty(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.empty(size : List[int],
memory_format : Optional[int],
out : Tensor) -> Tensor
torch.empty_like(self : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.empty_meta(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.empty_quantized(size : List[int],
qtensor : Tensor) -> Tensor
torch.empty_strided(size : List[int],
stride : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.eq(self : Tensor,
other : Tensor) -> Tensor
torch.eq(self : Tensor,
other : number) -> Tensor
torch.eq(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.eq(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.eq(a : List[int],
b : List[int]) -> bool
torch.eq(a : Device,
b : Device) -> bool
torch.eq(a : AnyEnumType,
b : AnyEnumType) -> bool
torch.eq(a : int,
b : int) -> bool
torch.eq(a : float,
b : float) -> bool
torch.eq(a : int,
b : float) -> bool
torch.eq(a : float,
b : int) -> bool
torch.eq(a : number,
b : number) -> bool
torch.eq(a : str,
b : str) -> bool
torch.eq(a : List[float],
b : List[float]) -> bool
torch.eq(a : List[Tensor],
b : List[Tensor]) -> bool
torch.eq(a : List[bool],
b : List[bool]) -> bool
torch.eq(a : List[str],
b : List[str]) -> bool
torch.equal(self : Tensor,
other : Tensor) -> bool
torch.erf(self : Tensor) -> Tensor
torch.erf(self : Tensor,
out : Tensor) -> Tensor
torch.erf(a : int) -> float
torch.erf(a : float) -> float
torch.erf(a : number) -> number
torch.erf_(self : Tensor) -> Tensor
torch.erfc(self : Tensor) -> Tensor
torch.erfc(self : Tensor,
out : Tensor) -> Tensor
torch.erfc(a : int) -> float
torch.erfc(a : float) -> float
torch.erfc(a : number) -> number
torch.erfc_(self : Tensor) -> Tensor
torch.erfinv(self : Tensor) -> Tensor
torch.erfinv(self : Tensor,
out : Tensor) -> Tensor
torch.exp(self : Tensor) -> Tensor
torch.exp(self : Tensor,
out : Tensor) -> Tensor
torch.exp(a : int) -> float
torch.exp(a : float) -> float
torch.exp(a : number) -> number
torch.exp2(self : Tensor,
out : Tensor) -> Tensor
torch.exp2(self : Tensor) -> Tensor
torch.exp2_(self : Tensor) -> Tensor
torch.exp_(self : Tensor) -> Tensor
torch.expm1(self : Tensor) -> Tensor
torch.expm1(self : Tensor,
out : Tensor) -> Tensor
torch.expm1(a : int) -> float
torch.expm1(a : float) -> float
torch.expm1(a : number) -> number
torch.expm1_(self : Tensor) -> Tensor
torch.eye(n : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.eye(n : int,
m : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.eye(n : int,
out : Tensor) -> Tensor
torch.eye(n : int,
m : int,
out : Tensor) -> Tensor
torch.fake_quantize_per_channel_affine(self : Tensor,
scale : Tensor,
zero_point : Tensor,
axis : int,
quant_min : int,
quant_max : int) -> Tensor
torch.fake_quantize_per_tensor_affine(self : Tensor,
scale : float,
zero_point : int,
quant_min : int,
quant_max : int) -> Tensor
torch.fbgemm_linear_fp16_weight(input : Tensor,
packed_weight : Tensor,
bias : Tensor) -> Tensor
torch.fbgemm_linear_fp16_weight_fp32_activation(input : Tensor,
packed_weight : Tensor,
bias : Tensor) -> Tensor
torch.fbgemm_linear_int8_weight(input : Tensor,
weight : Tensor,
packed : Tensor,
col_offsets : Tensor,
weight_scale : number,
weight_zero_point : number,
bias : Tensor) -> Tensor
torch.fbgemm_linear_int8_weight_fp32_activation(input : Tensor,
weight : Tensor,
packed : Tensor,
col_offsets : Tensor,
weight_scale : number,
weight_zero_point : number,
bias : Tensor) -> Tensor
torch.fbgemm_linear_quantize_weight(input : Tensor) -> Tuple[Tensor, Tensor, float, int]
torch.fbgemm_pack_gemm_matrix_fp16(input : Tensor) -> Tensor
torch.fbgemm_pack_quantized_matrix(input : Tensor) -> Tensor
torch.fbgemm_pack_quantized_matrix(input : Tensor,
K : int,
N : int) -> Tensor
torch.feature_alpha_dropout(input : Tensor,
p : float,
train : bool) -> Tensor
torch.feature_alpha_dropout_(self : Tensor,
p : float,
train : bool) -> Tensor
torch.feature_dropout(input : Tensor,
p : float,
train : bool) -> Tensor
torch.feature_dropout_(self : Tensor,
p : float,
train : bool) -> Tensor
torch.fill_(self : Tensor,
value : number) -> Tensor
torch.fill_(self : Tensor,
value : Tensor) -> Tensor
torch.fix(self : Tensor) -> Tensor
torch.fix(self : Tensor,
out : Tensor) -> Tensor
torch.fix_(self : Tensor) -> Tensor
torch.flatten(self : Tensor,
dims : List[str],
out_dim : str) -> Tensor
torch.flatten(self : Tensor,
start_dim : int,
end_dim : int,
out_dim : str) -> Tensor
torch.flatten(self : Tensor,
start_dim : int=0,
end_dim : int=-1) -> Tensor
torch.flatten(self : Tensor,
start_dim : str,
end_dim : str,
out_dim : str) -> Tensor
torch.flip(self : Tensor,
dims : List[int]) -> Tensor
torch.fliplr(self : Tensor) -> Tensor
torch.flipud(self : Tensor) -> Tensor
torch.float_power(self : Tensor,
exponent : Tensor,
out : Tensor) -> Tensor
torch.float_power(self : Tensor,
exponent : Tensor) -> Tensor
torch.float_power(self : number,
exponent : Tensor,
out : Tensor) -> Tensor
torch.float_power(self : number,
exponent : Tensor) -> Tensor
torch.float_power(self : Tensor,
exponent : number,
out : Tensor) -> Tensor
torch.float_power(self : Tensor,
exponent : number) -> Tensor
torch.floor(self : Tensor) -> Tensor
torch.floor(self : Tensor,
out : Tensor) -> Tensor
torch.floor(a : int) -> int
torch.floor(a : float) -> int
torch.floor(a : number) -> number
torch.floor_(self : Tensor) -> Tensor
torch.floor_divide(self : Tensor,
other : Tensor) -> Tensor
torch.floor_divide(self : Tensor,
other : number) -> Tensor
torch.floor_divide(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.fmax(self : Tensor,
other : Tensor) -> Tensor
torch.fmax(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.fmin(self : Tensor,
other : Tensor) -> Tensor
torch.fmin(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.fmod(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.fmod(self : Tensor,
other : number) -> Tensor
torch.fmod(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.fmod(self : Tensor,
other : Tensor) -> Tensor
torch.fmod(a : int,
b : int) -> float
torch.fmod(a : float,
b : float) -> float
torch.fmod(a : int,
b : float) -> float
torch.fmod(a : float,
b : int) -> float
torch.fmod(a : number,
b : number) -> float
torch.frac(self : Tensor) -> Tensor
torch.frac(self : Tensor,
out : Tensor) -> Tensor
torch.frac_(self : Tensor) -> Tensor
torch.frobenius_norm(self : Tensor) -> Tensor
torch.frobenius_norm(self : Tensor,
dim : List[int],
keepdim : bool=False) -> Tensor
torch.frobenius_norm(self : Tensor,
dim : List[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.from_file(filename : str,
shared : Optional[bool],
size : Optional[int]=0,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.full(size : List[int],
fill_value : number,
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.full(size : List[int],
fill_value : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.full(size : List[int],
fill_value : number,
out : Tensor) -> Tensor
torch.full_like(self : Tensor,
fill_value : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.gather(self : Tensor,
dim : int,
index : Tensor,
sparse_grad : bool=False,
out : Tensor) -> Tensor
torch.gather(self : Tensor,
dim : int,
index : Tensor,
sparse_grad : bool=False) -> Tensor
torch.gather(self : Tensor,
dim : str,
index : Tensor,
sparse_grad : bool=False,
out : Tensor) -> Tensor
torch.gather(self : Tensor,
dim : str,
index : Tensor,
sparse_grad : bool=False) -> Tensor
torch.gcd(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.gcd(self : Tensor,
other : Tensor) -> Tensor
torch.gcd(a : int,
b : int) -> int
torch.gcd_(self : Tensor,
other : Tensor) -> Tensor
torch.ge(self : Tensor,
other : Tensor) -> Tensor
torch.ge(self : Tensor,
other : number) -> Tensor
torch.ge(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.ge(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.ge(a : int,
b : int) -> bool
torch.ge(a : float,
b : float) -> bool
torch.ge(a : int,
b : float) -> bool
torch.ge(a : float,
b : int) -> bool
torch.ge(a : number,
b : number) -> bool
torch.ge(a : str,
b : str) -> bool
torch.geqrf(self : Tensor,
a : Tensor,
tau : Tensor) -> Tuple[Tensor, Tensor]
torch.geqrf(self : Tensor) -> Tuple[Tensor, Tensor]
torch.ger(self : Tensor,
vec2 : Tensor) -> Tensor
torch.ger(self : Tensor,
vec2 : Tensor,
out : Tensor) -> Tensor
torch.get_device(self : Tensor) -> int
torch.greater(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.greater(self : Tensor,
other : number) -> Tensor
torch.greater(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.greater(self : Tensor,
other : Tensor) -> Tensor
torch.greater_equal(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.greater_equal(self : Tensor,
other : number) -> Tensor
torch.greater_equal(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.greater_equal(self : Tensor,
other : Tensor) -> Tensor
torch.grid_sampler(input : Tensor,
grid : Tensor,
interpolation_mode : int,
padding_mode : int,
align_corners : bool) -> Tensor
torch.grid_sampler_2d(input : Tensor,
grid : Tensor,
interpolation_mode : int,
padding_mode : int,
align_corners : bool) -> Tensor
torch.grid_sampler_3d(input : Tensor,
grid : Tensor,
interpolation_mode : int,
padding_mode : int,
align_corners : bool) -> Tensor
torch.group_norm(input : Tensor,
num_groups : int,
weight : Optional[Tensor],
bias : Optional[Tensor],
eps : float=1e-05,
cudnn_enabled : bool=True) -> Tensor
torch.gru(input : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor]
torch.gru(data : Tensor,
batch_sizes : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor]
torch.gru_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Optional[Tensor],
b_hh : Optional[Tensor]) -> Tensor
torch.gt(self : Tensor,
other : Tensor) -> Tensor
torch.gt(self : Tensor,
other : number) -> Tensor
torch.gt(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.gt(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.gt(a : int,
b : int) -> bool
torch.gt(a : float,
b : float) -> bool
torch.gt(a : int,
b : float) -> bool
torch.gt(a : float,
b : int) -> bool
torch.gt(a : number,
b : number) -> bool
torch.gt(a : str,
b : str) -> bool
torch.hamming_window(window_length : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hamming_window(window_length : int,
periodic : bool,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hamming_window(window_length : int,
periodic : bool,
alpha : float,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hamming_window(window_length : int,
periodic : bool,
alpha : float,
beta : float,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hann_window(window_length : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hann_window(window_length : int,
periodic : bool,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.hardshrink(self : Tensor,
lambd : number=0.5) -> Tensor
torch.heaviside(self : Tensor,
values : Tensor,
out : Tensor) -> Tensor
torch.heaviside(self : Tensor,
values : Tensor) -> Tensor
torch.hinge_embedding_loss(self : Tensor,
target : Tensor,
margin : float=1.0,
reduction : int=1) -> Tensor
torch.histc(self : Tensor,
bins : int=100,
min : number=0,
max : number=0,
out : Tensor) -> Tensor
torch.histc(self : Tensor,
bins : int=100,
min : number=0,
max : number=0) -> Tensor
torch.hspmm(mat1 : Tensor,
mat2 : Tensor,
out : Tensor) -> Tensor
torch.hspmm(mat1 : Tensor,
mat2 : Tensor) -> Tensor
torch.hstack(tensors : List[Tensor]) -> Tensor
torch.hstack(tensors : List[Tensor],
out : Tensor) -> Tensor
torch.hypot(self : Tensor,
other : Tensor) -> Tensor
torch.hypot(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.i0(self : Tensor) -> Tensor
torch.i0(self : Tensor,
out : Tensor) -> Tensor
torch.i0_(self : Tensor) -> Tensor
torch.igamma(self : Tensor,
other : Tensor) -> Tensor
torch.igamma(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.igammac(self : Tensor,
other : Tensor) -> Tensor
torch.igammac(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.imag(self : Tensor) -> Tensor
torch.index_add(self : Tensor,
dim : int,
index : Tensor,
source : Tensor) -> Tensor
torch.index_add(self : Tensor,
dim : str,
index : Tensor,
source : Tensor) -> Tensor
torch.index_copy(self : Tensor,
dim : int,
index : Tensor,
source : Tensor) -> Tensor
torch.index_copy(self : Tensor,
dim : str,
index : Tensor,
source : Tensor) -> Tensor
torch.index_fill(self : Tensor,
dim : str,
index : Tensor,
value : number) -> Tensor
torch.index_fill(self : Tensor,
dim : str,
index : Tensor,
value : Tensor) -> Tensor
torch.index_fill(self : Tensor,
dim : int,
index : Tensor,
value : number) -> Tensor
torch.index_fill(self : Tensor,
dim : int,
index : Tensor,
value : Tensor) -> Tensor
torch.index_put(self : Tensor,
indices : List[Optional[Tensor]],
values : Tensor,
accumulate : bool=False) -> Tensor
torch.index_put(self : Tensor,
indices : List[Tensor],
values : Tensor,
accumulate : bool=False) -> Tensor
torch.index_put_(self : Tensor,
indices : List[Optional[Tensor]],
values : Tensor,
accumulate : bool=False) -> Tensor
torch.index_put_(self : Tensor,
indices : List[Tensor],
values : Tensor,
accumulate : bool=False) -> Tensor
torch.index_select(self : Tensor,
dim : int,
index : Tensor,
out : Tensor) -> Tensor
torch.index_select(self : Tensor,
dim : int,
index : Tensor) -> Tensor
torch.index_select(self : Tensor,
dim : str,
index : Tensor,
out : Tensor) -> Tensor
torch.index_select(self : Tensor,
dim : str,
index : Tensor) -> Tensor
torch.inner(self : Tensor,
other : Tensor) -> Tensor
torch.inner(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.instance_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
use_input_stats : bool,
momentum : float,
eps : float,
cudnn_enabled : bool) -> Tensor
torch.int_repr(self : Tensor) -> Tensor
torch.inverse(self : Tensor) -> Tensor
torch.inverse(self : Tensor,
out : Tensor) -> Tensor
torch.is_complex(self : Tensor) -> bool
torch.is_distributed(self : Tensor) -> bool
torch.is_floating_point(self : Tensor) -> bool
torch.is_grad_enabled() -> bool
torch.is_nonzero(self : Tensor) -> bool
torch.is_same_size(self : Tensor,
other : Tensor) -> bool
torch.is_signed(self : Tensor) -> bool
torch.is_vulkan_available() -> bool
torch.isclose(self : Tensor,
other : Tensor,
rtol : float=1e-05,
atol : float=1e-08,
equal_nan : bool=False) -> Tensor
torch.isfinite(self : Tensor) -> Tensor
torch.isfinite(a : float) -> bool
torch.isinf(self : Tensor) -> Tensor
torch.isinf(a : float) -> bool
torch.isnan(self : Tensor) -> Tensor
torch.isnan(a : float) -> bool
torch.isneginf(self : Tensor,
out : Tensor) -> Tensor
torch.isneginf(self : Tensor) -> Tensor
torch.isposinf(self : Tensor,
out : Tensor) -> Tensor
torch.isposinf(self : Tensor) -> Tensor
torch.isreal(self : Tensor) -> Tensor
torch.kaiser_window(window_length : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.kaiser_window(window_length : int,
periodic : bool,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.kaiser_window(window_length : int,
periodic : bool,
beta : float,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.kl_div(self : Tensor,
target : Tensor,
reduction : int=1,
log_target : bool=False) -> Tensor
torch.kron(self : Tensor,
other : Tensor) -> Tensor
torch.kron(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.kthvalue(self : Tensor,
k : int,
dim : int=-1,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.kthvalue(self : Tensor,
k : int,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.kthvalue(self : Tensor,
k : int,
dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.kthvalue(self : Tensor,
k : int,
dim : int=-1,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.layer_norm(input : Tensor,
normalized_shape : List[int],
weight : Optional[Tensor],
bias : Optional[Tensor],
eps : float=1e-05,
cudnn_enable : bool=True) -> Tensor
torch.lcm(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.lcm(self : Tensor,
other : Tensor) -> Tensor
torch.lcm_(self : Tensor,
other : Tensor) -> Tensor
torch.ldexp(self : Tensor,
other : Tensor) -> Tensor
torch.ldexp(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.ldexp(x : float,
i : int) -> float
torch.ldexp_(self : Tensor,
other : Tensor) -> Tensor
torch.le(self : Tensor,
other : Tensor) -> Tensor
torch.le(self : Tensor,
other : number) -> Tensor
torch.le(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.le(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.le(a : int,
b : int) -> bool
torch.le(a : float,
b : float) -> bool
torch.le(a : int,
b : float) -> bool
torch.le(a : float,
b : int) -> bool
torch.le(a : number,
b : number) -> bool
torch.le(a : str,
b : str) -> bool
torch.lerp(self : Tensor,
end : Tensor,
weight : number,
out : Tensor) -> Tensor
torch.lerp(self : Tensor,
end : Tensor,
weight : number) -> Tensor
torch.lerp(self : Tensor,
end : Tensor,
weight : Tensor,
out : Tensor) -> Tensor
torch.lerp(self : Tensor,
end : Tensor,
weight : Tensor) -> Tensor
torch.less(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.less(self : Tensor,
other : number) -> Tensor
torch.less(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.less(self : Tensor,
other : Tensor) -> Tensor
torch.less_equal(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.less_equal(self : Tensor,
other : number) -> Tensor
torch.less_equal(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.less_equal(self : Tensor,
other : Tensor) -> Tensor
torch.lgamma(self : Tensor) -> Tensor
torch.lgamma(self : Tensor,
out : Tensor) -> Tensor
torch.lgamma(a : int) -> float
torch.lgamma(a : float) -> float
torch.lgamma(a : number) -> number
torch.linspace(start : number,
end : number,
steps : Optional[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.linspace(start : number,
end : number,
steps : Optional[int],
out : Tensor) -> Tensor
torch.log(self : Tensor) -> Tensor
torch.log(self : Tensor,
out : Tensor) -> Tensor
torch.log(a : int) -> float
torch.log(a : float) -> float
torch.log(a : number) -> number
torch.log(a : int,
b : int) -> float
torch.log(a : float,
b : float) -> float
torch.log(a : int,
b : float) -> float
torch.log(a : float,
b : int) -> float
torch.log(a : number,
b : number) -> float
torch.log10(self : Tensor) -> Tensor
torch.log10(self : Tensor,
out : Tensor) -> Tensor
torch.log10(a : int) -> float
torch.log10(a : float) -> float
torch.log10(a : number) -> number
torch.log10_(self : Tensor) -> Tensor
torch.log1p(self : Tensor) -> Tensor
torch.log1p(self : Tensor,
out : Tensor) -> Tensor
torch.log1p(a : int) -> float
torch.log1p(a : float) -> float
torch.log1p(a : number) -> number
torch.log1p_(self : Tensor) -> Tensor
torch.log2(self : Tensor) -> Tensor
torch.log2(self : Tensor,
out : Tensor) -> Tensor
torch.log2_(self : Tensor) -> Tensor
torch.log_(self : Tensor) -> Tensor
torch.log_softmax(self : Tensor,
dim : int,
dtype : Optional[int]) -> Tensor
torch.log_softmax(self : Tensor,
dim : str,
dtype : Optional[int]) -> Tensor
torch.logaddexp(self : Tensor,
other : Tensor) -> Tensor
torch.logaddexp(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.logaddexp2(self : Tensor,
other : Tensor) -> Tensor
torch.logaddexp2(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.logcumsumexp(self : Tensor,
dim : int) -> Tensor
torch.logcumsumexp(self : Tensor,
dim : str) -> Tensor
torch.logcumsumexp(self : Tensor,
dim : str,
out : Tensor) -> Tensor
torch.logcumsumexp(self : Tensor,
dim : int,
out : Tensor) -> Tensor
torch.logdet(self : Tensor) -> Tensor
torch.logical_and(self : Tensor,
other : Tensor) -> Tensor
torch.logical_and(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.logical_not(self : Tensor) -> Tensor
torch.logical_not(self : Tensor,
out : Tensor) -> Tensor
torch.logical_or(self : Tensor,
other : Tensor) -> Tensor
torch.logical_or(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.logical_xor(self : Tensor,
other : Tensor) -> Tensor
torch.logical_xor(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.logit(self : Tensor,
eps : Optional[float]) -> Tensor
torch.logit(self : Tensor,
eps : Optional[float],
out : Tensor) -> Tensor
torch.logit_(self : Tensor,
eps : Optional[float]) -> Tensor
torch.logspace(start : number,
end : number,
steps : Optional[int],
base : float=10.0,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.logspace(start : number,
end : number,
steps : Optional[int],
base : float=10.0,
out : Tensor) -> Tensor
torch.logsumexp(self : Tensor,
dim : List[int],
keepdim : bool=False) -> Tensor
torch.logsumexp(self : Tensor,
dim : List[str],
keepdim : bool=False) -> Tensor
torch.logsumexp(self : Tensor,
dim : List[str],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.logsumexp(self : Tensor,
dim : List[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.lstm(input : Tensor,
hx : List[Tensor],
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor, Tensor]
torch.lstm(data : Tensor,
batch_sizes : Tensor,
hx : List[Tensor],
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor, Tensor]
torch.lstm_cell(input : Tensor,
hx : List[Tensor],
w_ih : Tensor,
w_hh : Tensor,
b_ih : Optional[Tensor],
b_hh : Optional[Tensor]) -> Tuple[Tensor, Tensor]
torch.lstsq(self : Tensor,
A : Tensor,
X : Tensor,
qr : Tensor) -> Tuple[Tensor, Tensor]
torch.lstsq(self : Tensor,
A : Tensor) -> Tuple[Tensor, Tensor]
torch.lt(self : Tensor,
other : Tensor) -> Tensor
torch.lt(self : Tensor,
other : number) -> Tensor
torch.lt(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.lt(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.lt(a : int,
b : int) -> bool
torch.lt(a : float,
b : float) -> bool
torch.lt(a : int,
b : float) -> bool
torch.lt(a : float,
b : int) -> bool
torch.lt(a : number,
b : number) -> bool
torch.lt(a : str,
b : str) -> bool
torch.lu_solve(self : Tensor,
LU_data : Tensor,
LU_pivots : Tensor,
out : Tensor) -> Tensor
torch.lu_solve(self : Tensor,
LU_data : Tensor,
LU_pivots : Tensor) -> Tensor
torch.manual_seed(seed : int) -> Tuple[]
torch.margin_ranking_loss(input1 : Tensor,
input2 : Tensor,
target : Tensor,
margin : float=0.0,
reduction : int=1) -> Tensor
torch.masked_fill(self : Tensor,
mask : Tensor,
value : number) -> Tensor
torch.masked_fill(self : Tensor,
mask : Tensor,
value : Tensor) -> Tensor
torch.masked_scatter(self : Tensor,
mask : Tensor,
source : Tensor) -> Tensor
torch.masked_select(self : Tensor,
mask : Tensor) -> Tensor
torch.masked_select(self : Tensor,
mask : Tensor,
out : Tensor) -> Tensor
torch.matmul(self : Tensor,
other : Tensor) -> Tensor
torch.matmul(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.matrix_exp(self : Tensor) -> Tensor
torch.matrix_power(self : Tensor,
n : int) -> Tensor
torch.matrix_rank(self : Tensor,
tol : float,
symmetric : bool=False) -> Tensor
torch.matrix_rank(self : Tensor,
symmetric : bool=False) -> Tensor
torch.max(self : Tensor) -> Tensor
torch.max(self : Tensor,
dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.max(self : Tensor,
dim : int,
keepdim : bool=False,
max : Tensor,
max_values : Tensor) -> Tuple[Tensor, Tensor]
torch.max(self : Tensor,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.max(self : Tensor,
dim : str,
keepdim : bool=False,
max : Tensor,
max_values : Tensor) -> Tuple[Tensor, Tensor]
torch.max(self : Tensor,
other : Tensor) -> Tensor
torch.max(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.max_pool1d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0],
dilation : List[int]=[1],
ceil_mode : bool=False) -> Tensor
torch.max_pool1d_with_indices(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0],
dilation : List[int]=[1],
ceil_mode : bool=False) -> Tuple[Tensor, Tensor]
torch.max_pool2d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
ceil_mode : bool=False) -> Tensor
torch.max_pool3d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
ceil_mode : bool=False) -> Tensor
torch.maximum(self : Tensor,
other : Tensor) -> Tensor
torch.maximum(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.mean(self : Tensor,
dtype : Optional[int]) -> Tensor
torch.mean(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.mean(self : Tensor,
dim : List[str],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.mean(self : Tensor,
dim : List[str],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.mean(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.median(self : Tensor) -> Tensor
torch.median(self : Tensor,
dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.median(self : Tensor,
dim : int,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.median(self : Tensor,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.median(self : Tensor,
dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.meshgrid(tensors : List[Tensor]) -> List[Tensor]
torch.min(self : Tensor) -> Tensor
torch.min(self : Tensor,
dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.min(self : Tensor,
dim : int,
keepdim : bool=False,
min : Tensor,
min_indices : Tensor) -> Tuple[Tensor, Tensor]
torch.min(self : Tensor,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.min(self : Tensor,
dim : str,
keepdim : bool=False,
min : Tensor,
min_indices : Tensor) -> Tuple[Tensor, Tensor]
torch.min(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.min(self : Tensor,
other : Tensor) -> Tensor
torch.minimum(self : Tensor,
other : Tensor) -> Tensor
torch.minimum(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.miopen_batch_norm(input : Tensor,
weight : Tensor,
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
training : bool,
exponential_average_factor : float,
epsilon : float) -> Tuple[Tensor, Tensor, Tensor]
torch.miopen_convolution(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.miopen_convolution_transpose(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
output_padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.miopen_depthwise_convolution(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
benchmark : bool,
deterministic : bool) -> Tensor
torch.miopen_rnn(input : Tensor,
weight : List[Tensor],
weight_stride0 : int,
hx : Tensor,
cx : Optional[Tensor],
mode : int,
hidden_size : int,
num_layers : int,
batch_first : bool,
dropout : float,
train : bool,
bidirectional : bool,
batch_sizes : List[int],
dropout_state : Optional[Tensor]) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor]
torch.mkldnn_adaptive_avg_pool2d(self : Tensor,
output_size : List[int]) -> Tensor
torch.mkldnn_convolution(self : Tensor,
weight : Tensor,
bias : Optional[Tensor],
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int) -> Tensor
torch.mkldnn_convolution_backward_weights(weight_size : List[int],
grad_output : Tensor,
self : Tensor,
padding : List[int],
stride : List[int],
dilation : List[int],
groups : int,
bias_defined : bool) -> Tuple[Tensor, Tensor]
torch.mkldnn_linear_backward_weights(grad_output : Tensor,
input : Tensor,
weight : Tensor,
bias_defined : bool) -> Tuple[Tensor, Tensor]
torch.mkldnn_max_pool2d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
ceil_mode : bool=False) -> Tensor
torch.mkldnn_max_pool3d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
ceil_mode : bool=False) -> Tensor
torch.mm(self : Tensor,
mat2 : Tensor) -> Tensor
torch.mm(self : Tensor,
mat2 : Tensor,
out : Tensor) -> Tensor
torch.mode(self : Tensor,
dim : int=-1,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.mode(self : Tensor,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.mode(self : Tensor,
dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.mode(self : Tensor,
dim : int=-1,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.moveaxis(self : Tensor,
source : List[int],
destination : List[int]) -> Tensor
torch.moveaxis(self : Tensor,
source : int,
destination : int) -> Tensor
torch.movedim(self : Tensor,
source : List[int],
destination : List[int]) -> Tensor
torch.movedim(self : Tensor,
source : int,
destination : int) -> Tensor
torch.msort(self : Tensor,
out : Tensor) -> Tensor
torch.msort(self : Tensor) -> Tensor
torch.mul(self : Tensor,
other : Tensor) -> Tensor
torch.mul(self : Tensor,
other : number) -> Tensor
torch.mul(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.mul(l : List[t],
n : int) -> List[t]
torch.mul(n : int,
l : List[t]) -> List[t]
torch.mul(a : int,
b : int) -> int
torch.mul(a : float,
b : float) -> float
torch.mul(a : int,
b : float) -> float
torch.mul(a : float,
b : int) -> float
torch.mul(a : number,
b : number) -> number
torch.multinomial(self : Tensor,
num_samples : int,
replacement : bool=False,
generator : Optional[Generator]) -> Tensor
torch.multinomial(self : Tensor,
num_samples : int,
replacement : bool=False,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.multiply(self : Tensor,
other : Tensor) -> Tensor
torch.multiply(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.multiply(self : Tensor,
other : number) -> Tensor
torch.mv(self : Tensor,
vec : Tensor) -> Tensor
torch.mv(self : Tensor,
vec : Tensor,
out : Tensor) -> Tensor
torch.mvlgamma(self : Tensor,
p : int) -> Tensor
torch.nan_to_num(self : Tensor,
nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float]) -> Tensor
torch.nan_to_num(self : Tensor,
nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float],
out : Tensor) -> Tensor
torch.nan_to_num_(self : Tensor,
nan : Optional[float],
posinf : Optional[float],
neginf : Optional[float]) -> Tensor
torch.nanmedian(self : Tensor) -> Tensor
torch.nanmedian(self : Tensor,
dim : int,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.nanmedian(self : Tensor,
dim : int,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.nanmedian(self : Tensor,
dim : str,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.nanmedian(self : Tensor,
dim : str,
keepdim : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.nanquantile(self : Tensor,
q : float,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.nanquantile(self : Tensor,
q : float,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.nanquantile(self : Tensor,
q : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.nanquantile(self : Tensor,
q : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.nansum(self : Tensor,
dtype : Optional[int]) -> Tensor
torch.nansum(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.nansum(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.narrow(self : Tensor,
dim : int,
start : int,
length : int) -> Tensor
torch.narrow(self : Tensor,
dim : int,
start : Tensor,
length : int) -> Tensor
torch.narrow_copy(self : Tensor,
dim : int,
start : int,
length : int) -> Tensor
torch.narrow_copy(self : Tensor,
dim : int,
start : int,
length : int,
out : Tensor) -> Tensor
torch.native_batch_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
training : bool,
momentum : float,
eps : float) -> Tuple[Tensor, Tensor, Tensor]
torch.native_batch_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
running_mean : Optional[Tensor],
running_var : Optional[Tensor],
training : bool,
momentum : float,
eps : float,
out : Tensor,
save_mean : Tensor,
save_invstd : Tensor) -> Tuple[Tensor, Tensor, Tensor]
torch.native_group_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
N : int,
C : int,
HxW : int,
group : int,
eps : float) -> Tuple[Tensor, Tensor, Tensor]
torch.native_layer_norm(input : Tensor,
normalized_shape : List[int],
weight : Optional[Tensor],
bias : Optional[Tensor],
eps : float) -> Tuple[Tensor, Tensor, Tensor]
torch.native_norm(self : Tensor,
p : number=2) -> Tensor
torch.native_norm(self : Tensor,
p : Optional[number],
dim : List[int],
keepdim : bool,
dtype : Optional[int]) -> Tensor
torch.ne(self : Tensor,
other : Tensor) -> Tensor
torch.ne(self : Tensor,
other : number) -> Tensor
torch.ne(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.ne(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.ne(a : List[int],
b : List[int]) -> bool
torch.ne(a : AnyEnumType,
b : AnyEnumType) -> bool
torch.ne(a : int,
b : int) -> bool
torch.ne(a : float,
b : float) -> bool
torch.ne(a : int,
b : float) -> bool
torch.ne(a : float,
b : int) -> bool
torch.ne(a : number,
b : number) -> bool
torch.ne(a : str,
b : str) -> bool
torch.ne(a : List[float],
b : List[float]) -> bool
torch.ne(a : List[Tensor],
b : List[Tensor]) -> bool
torch.ne(a : List[bool],
b : List[bool]) -> bool
torch.ne(a : List[str],
b : List[str]) -> bool
torch.neg(self : Tensor) -> Tensor
torch.neg(self : Tensor,
out : Tensor) -> Tensor
torch.neg(a : int) -> int
torch.neg(a : float) -> float
torch.neg(a : number) -> number
torch.neg_(self : Tensor) -> Tensor
torch.negative(self : Tensor) -> Tensor
torch.negative(self : Tensor,
out : Tensor) -> Tensor
torch.negative_(self : Tensor) -> Tensor
torch.nextafter(self : Tensor,
other : Tensor) -> Tensor
torch.nextafter(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.nonzero(self : Tensor,
out : Tensor) -> Tensor
torch.nonzero(self : Tensor) -> Tensor
torch.norm_except_dim(v : Tensor,
pow : int=2,
dim : int=0) -> Tensor
torch.normal(mean : Tensor,
std : float=1.0,
generator : Optional[Generator]) -> Tensor
torch.normal(mean : Tensor,
std : float=1.0,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.normal(mean : float,
std : Tensor,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.normal(mean : float,
std : Tensor,
generator : Optional[Generator]) -> Tensor
torch.normal(mean : Tensor,
std : Tensor,
generator : Optional[Generator]) -> Tensor
torch.normal(mean : Tensor,
std : Tensor,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.normal(mean : float,
std : float,
size : List[int],
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.normal(mean : float,
std : float,
size : List[int],
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.not_equal(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.not_equal(self : Tensor,
other : number) -> Tensor
torch.not_equal(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.not_equal(self : Tensor,
other : Tensor) -> Tensor
torch.nuclear_norm(self : Tensor,
keepdim : bool=False) -> Tensor
torch.nuclear_norm(self : Tensor,
dim : List[int],
keepdim : bool=False) -> Tensor
torch.nuclear_norm(self : Tensor,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.nuclear_norm(self : Tensor,
dim : List[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.numel(self : Tensor) -> int
torch.ones(size : List[int],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.ones(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.ones(size : List[int],
out : Tensor) -> Tensor
torch.ones_like(self : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.orgqr(self : Tensor,
input2 : Tensor,
out : Tensor) -> Tensor
torch.orgqr(self : Tensor,
input2 : Tensor) -> Tensor
torch.ormqr(self : Tensor,
input2 : Tensor,
input3 : Tensor,
left : bool=True,
transpose : bool=False,
out : Tensor) -> Tensor
torch.ormqr(self : Tensor,
input2 : Tensor,
input3 : Tensor,
left : bool=True,
transpose : bool=False) -> Tensor
torch.outer(self : Tensor,
vec2 : Tensor) -> Tensor
torch.outer(self : Tensor,
vec2 : Tensor,
out : Tensor) -> Tensor
torch.pairwise_distance(x1 : Tensor,
x2 : Tensor,
p : float=2.0,
eps : float=1e-06,
keepdim : bool=False) -> Tensor
torch.pdist(self : Tensor,
p : float=2.0) -> Tensor
torch.pinverse(self : Tensor,
rcond : float=1e-15) -> Tensor
torch.pixel_shuffle(self : Tensor,
upscale_factor : int) -> Tensor
torch.pixel_unshuffle(self : Tensor,
downscale_factor : int) -> Tensor
torch.poisson(self : Tensor,
generator : Optional[Generator]) -> Tensor
torch.poisson_nll_loss(input : Tensor,
target : Tensor,
log_input : bool,
full : bool,
eps : float,
reduction : int) -> Tensor
torch.polar(abs : Tensor,
angle : Tensor,
out : Tensor) -> Tensor
torch.polar(abs : Tensor,
angle : Tensor) -> Tensor
torch.polygamma(n : int,
self : Tensor) -> Tensor
torch.polygamma(n : int,
self : Tensor,
out : Tensor) -> Tensor
torch.pow(self : Tensor,
exponent : Tensor) -> Tensor
torch.pow(self : Tensor,
exponent : number) -> Tensor
torch.pow(self : number,
exponent : Tensor) -> Tensor
torch.pow(self : number,
exponent : Tensor,
out : Tensor) -> Tensor
torch.pow(self : Tensor,
exponent : number,
out : Tensor) -> Tensor
torch.pow(self : Tensor,
exponent : Tensor,
out : Tensor) -> Tensor
torch.pow(a : int,
b : int) -> float
torch.pow(a : float,
b : float) -> float
torch.pow(a : int,
b : float) -> float
torch.pow(a : float,
b : int) -> float
torch.pow(a : number,
b : number) -> float
torch.pow(a : int,
b : int) -> int
torch.prelu(self : Tensor,
weight : Tensor) -> Tensor
torch.prod(self : Tensor,
dtype : Optional[int]) -> Tensor
torch.prod(self : Tensor,
dim : int,
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.prod(self : Tensor,
dim : str,
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.prod(self : Tensor,
dim : str,
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.prod(self : Tensor,
dim : int,
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.promote_types(type1 : int,
type2 : int) -> int
torch.q_per_channel_axis(self : Tensor) -> int
torch.q_per_channel_scales(self : Tensor) -> Tensor
torch.q_per_channel_zero_points(self : Tensor) -> Tensor
torch.q_scale(self : Tensor) -> float
torch.q_zero_point(self : Tensor) -> int
torch.qr(self : Tensor,
some : bool=True,
Q : Tensor,
R : Tensor) -> Tuple[Tensor, Tensor]
torch.qr(self : Tensor,
some : bool=True) -> Tuple[Tensor, Tensor]
torch.qscheme(self : Tensor) -> QScheme
torch.quantile(self : Tensor,
q : float,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.quantile(self : Tensor,
q : float,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.quantile(self : Tensor,
q : Tensor,
dim : Optional[int],
keepdim : bool=False,
out : Tensor) -> Tensor
torch.quantile(self : Tensor,
q : Tensor,
dim : Optional[int],
keepdim : bool=False) -> Tensor
torch.quantize_per_channel(self : Tensor,
scales : Tensor,
zero_points : Tensor,
axis : int,
dtype : int) -> Tensor
torch.quantize_per_tensor(self : Tensor,
scale : float,
zero_point : int,
dtype : int) -> Tensor
torch.quantize_per_tensor(tensors : List[Tensor],
scales : Tensor,
zero_points : Tensor,
dtype : int) -> List[Tensor]
torch.quantized_batch_norm(input : Tensor,
weight : Optional[Tensor],
bias : Optional[Tensor],
mean : Tensor,
var : Tensor,
eps : float,
output_scale : float,
output_zero_point : int) -> Tensor
torch.quantized_gru(input : Tensor,
hx : Tensor,
params : List[__torch__.torch.classes.rnn.CellParamsBase],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor]
torch.quantized_gru(data : Tensor,
batch_sizes : Tensor,
hx : Tensor,
params : List[__torch__.torch.classes.rnn.CellParamsBase],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor]
torch.quantized_gru(input : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor]
torch.quantized_gru(data : Tensor,
batch_sizes : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor]
torch.quantized_gru_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Tensor,
b_hh : Tensor,
packed_ih : Tensor,
packed_hh : Tensor,
col_offsets_ih : Tensor,
col_offsets_hh : Tensor,
scale_ih : number,
scale_hh : number,
zero_point_ih : number,
zero_point_hh : number) -> Tensor
torch.quantized_lstm(input : Tensor,
hx : List[Tensor],
params : List[__torch__.torch.classes.rnn.CellParamsBase],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool,
dtype : Optional[int],
use_dynamic : bool=False) -> Tuple[Tensor, Tensor, Tensor]
torch.quantized_lstm(data : Tensor,
batch_sizes : Tensor,
hx : List[Tensor],
params : List[__torch__.torch.classes.rnn.CellParamsBase],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
dtype : Optional[int],
use_dynamic : bool=False) -> Tuple[Tensor, Tensor, Tensor]
torch.quantized_lstm(input : Tensor,
hx : List[Tensor],
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool,
dtype : Optional[int],
use_dynamic : bool=False) -> Tuple[Tensor, Tensor, Tensor]
torch.quantized_lstm(data : Tensor,
batch_sizes : Tensor,
hx : List[Tensor],
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
dtype : Optional[int],
use_dynamic : bool=False) -> Tuple[Tensor, Tensor, Tensor]
torch.quantized_lstm_cell(input : Tensor,
hx : List[Tensor],
w_ih : Tensor,
w_hh : Tensor,
b_ih : Tensor,
b_hh : Tensor,
packed_ih : Tensor,
packed_hh : Tensor,
col_offsets_ih : Tensor,
col_offsets_hh : Tensor,
scale_ih : number,
scale_hh : number,
zero_point_ih : number,
zero_point_hh : number) -> Tuple[Tensor, Tensor]
torch.quantized_max_pool1d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0],
dilation : List[int]=[1],
ceil_mode : bool=False) -> Tensor
torch.quantized_max_pool2d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
ceil_mode : bool=False) -> Tensor
torch.quantized_rnn_relu_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Tensor,
b_hh : Tensor,
packed_ih : Tensor,
packed_hh : Tensor,
col_offsets_ih : Tensor,
col_offsets_hh : Tensor,
scale_ih : number,
scale_hh : number,
zero_point_ih : number,
zero_point_hh : number) -> Tensor
torch.quantized_rnn_tanh_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Tensor,
b_hh : Tensor,
packed_ih : Tensor,
packed_hh : Tensor,
col_offsets_ih : Tensor,
col_offsets_hh : Tensor,
scale_ih : number,
scale_hh : number,
zero_point_ih : number,
zero_point_hh : number) -> Tensor
torch.rad2deg(self : Tensor) -> Tensor
torch.rad2deg(self : Tensor,
out : Tensor) -> Tensor
torch.rad2deg_(self : Tensor) -> Tensor
torch.rand(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.rand(size : List[int],
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.rand(size : List[int],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.rand(size : List[int],
generator : Optional[Generator],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.rand(size : List[int],
out : Tensor) -> Tensor
torch.rand(size : List[int],
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.rand_like(self : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.randint(high : int,
size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randint(high : int,
size : List[int],
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randint(low : int,
high : int,
size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randint(low : int,
high : int,
size : List[int],
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randint(high : int,
size : List[int],
out : Tensor) -> Tensor
torch.randint(high : int,
size : List[int],
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.randint(low : int,
high : int,
size : List[int],
out : Tensor) -> Tensor
torch.randint(low : int,
high : int,
size : List[int],
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.randint_like(self : Tensor,
high : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.randint_like(self : Tensor,
low : int,
high : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.randn(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randn(size : List[int],
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randn(size : List[int],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randn(size : List[int],
generator : Optional[Generator],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randn(size : List[int],
out : Tensor) -> Tensor
torch.randn(size : List[int],
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.randn_like(self : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch.randperm(n : int,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randperm(n : int,
generator : Optional[Generator],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.randperm(n : int,
out : Tensor) -> Tensor
torch.randperm(n : int,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch.range(start : number,
end : number,
step : number=1,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.range(start : number,
end : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.range(start : number,
end : number,
step : number=1,
out : Tensor) -> Tensor
torch.ravel(self : Tensor) -> Tensor
torch.real(self : Tensor) -> Tensor
torch.reciprocal(self : Tensor) -> Tensor
torch.reciprocal(self : Tensor,
out : Tensor) -> Tensor
torch.reciprocal_(self : Tensor) -> Tensor
torch.relu(self : Tensor) -> Tensor
torch.relu_(self : Tensor) -> Tensor
torch.remainder(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.remainder(self : Tensor,
other : number) -> Tensor
torch.remainder(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.remainder(self : Tensor,
other : Tensor) -> Tensor
torch.remainder(a : int,
b : int) -> int
torch.remainder(a : float,
b : float) -> float
torch.remainder(a : int,
b : float) -> float
torch.remainder(a : float,
b : int) -> float
torch.remainder(a : number,
b : number) -> number
torch.renorm(self : Tensor,
p : number,
dim : int,
maxnorm : number) -> Tensor
torch.renorm(self : Tensor,
p : number,
dim : int,
maxnorm : number,
out : Tensor) -> Tensor
torch.repeat_interleave(repeats : Tensor) -> Tensor
torch.repeat_interleave(self : Tensor,
repeats : Tensor,
dim : Optional[int]) -> Tensor
torch.repeat_interleave(self : Tensor,
repeats : int,
dim : Optional[int]) -> Tensor
torch.reshape(self : Tensor,
shape : List[int]) -> Tensor
torch.resize_as_(self : Tensor,
the_template : Tensor,
memory_format : Optional[int]) -> Tensor
torch.result_type(tensor : Tensor,
other : Tensor) -> int
torch.result_type(tensor : Tensor,
other : number) -> int
torch.result_type(scalar : number,
tensor : Tensor) -> int
torch.result_type(scalar1 : number,
scalar2 : number) -> int
torch.rnn_relu(input : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor]
torch.rnn_relu(data : Tensor,
batch_sizes : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor]
torch.rnn_relu_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Optional[Tensor],
b_hh : Optional[Tensor]) -> Tensor
torch.rnn_tanh(input : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool,
batch_first : bool) -> Tuple[Tensor, Tensor]
torch.rnn_tanh(data : Tensor,
batch_sizes : Tensor,
hx : Tensor,
params : List[Tensor],
has_biases : bool,
num_layers : int,
dropout : float,
train : bool,
bidirectional : bool) -> Tuple[Tensor, Tensor]
torch.rnn_tanh_cell(input : Tensor,
hx : Tensor,
w_ih : Tensor,
w_hh : Tensor,
b_ih : Optional[Tensor],
b_hh : Optional[Tensor]) -> Tensor
torch.roll(self : Tensor,
shifts : List[int],
dims : List[int]=[]) -> Tensor
torch.rot90(self : Tensor,
k : int=1,
dims : List[int]=[0, 1]) -> Tensor
torch.round(self : Tensor) -> Tensor
torch.round(self : Tensor,
out : Tensor) -> Tensor
torch.round(a : int) -> float
torch.round(a : float) -> float
torch.round(a : number) -> number
torch.round_(self : Tensor) -> Tensor
torch.row_stack(tensors : List[Tensor]) -> Tensor
torch.row_stack(tensors : List[Tensor],
out : Tensor) -> Tensor
torch.rrelu(self : Tensor,
lower : number=0.125,
upper : number=0.3333333333333333,
training : bool=False,
generator : Optional[Generator]) -> Tensor
torch.rrelu_(self : Tensor,
lower : number=0.125,
upper : number=0.3333333333333333,
training : bool=False,
generator : Optional[Generator]) -> Tensor
torch.rsqrt(self : Tensor) -> Tensor
torch.rsqrt(self : Tensor,
out : Tensor) -> Tensor
torch.rsqrt_(self : Tensor) -> Tensor
torch.rsub(self : Tensor,
other : Tensor,
alpha : number=1) -> Tensor
torch.rsub(self : Tensor,
other : number,
alpha : number=1) -> Tensor
torch.save(item : t,
filename : str) -> Tuple[]
torch.scalar_tensor(s : number,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.scatter(self : Tensor,
dim : int,
index : Tensor,
src : Tensor) -> Tensor
torch.scatter(self : Tensor,
dim : int,
index : Tensor,
value : number) -> Tensor
torch.scatter(self : Tensor,
dim : str,
index : Tensor,
src : Tensor) -> Tensor
torch.scatter(self : Tensor,
dim : str,
index : Tensor,
value : number) -> Tensor
torch.scatter_add(self : Tensor,
dim : int,
index : Tensor,
src : Tensor) -> Tensor
torch.scatter_add(self : Tensor,
dim : str,
index : Tensor,
src : Tensor) -> Tensor
torch.searchsorted(sorted_sequence : Tensor,
self : Tensor,
out_int32 : bool=False,
right : bool=False) -> Tensor
torch.searchsorted(sorted_sequence : Tensor,
self : Tensor,
out_int32 : bool=False,
right : bool=False,
out : Tensor) -> Tensor
torch.searchsorted(sorted_sequence : Tensor,
self : number,
out_int32 : bool=False,
right : bool=False) -> Tensor
torch.select(self : Tensor,
dim : int,
index : int) -> Tensor
torch.select(self : Tensor,
dim : str,
index : int) -> Tensor
torch.select(list : List[t],
idx : int) -> t
torch.selu(self : Tensor) -> Tensor
torch.selu_(self : Tensor) -> Tensor
torch.set_grad_enabled(val : bool) -> Tuple[]
torch.sgn(self : Tensor,
out : Tensor) -> Tensor
torch.sgn(self : Tensor) -> Tensor
torch.sigmoid(self : Tensor) -> Tensor
torch.sigmoid(self : Tensor,
out : Tensor) -> Tensor
torch.sigmoid_(self : Tensor) -> Tensor
torch.sign(self : Tensor) -> Tensor
torch.sign(self : Tensor,
out : Tensor) -> Tensor
torch.signbit(self : Tensor) -> Tensor
torch.signbit(self : Tensor,
out : Tensor) -> Tensor
torch.sin(self : Tensor) -> Tensor
torch.sin(self : Tensor,
out : Tensor) -> Tensor
torch.sin(a : int) -> float
torch.sin(a : float) -> float
torch.sin(a : number) -> number
torch.sin_(self : Tensor) -> Tensor
torch.sinc(self : Tensor,
out : Tensor) -> Tensor
torch.sinc(self : Tensor) -> Tensor
torch.sinc_(self : Tensor) -> Tensor
torch.sinh(self : Tensor) -> Tensor
torch.sinh(self : Tensor,
out : Tensor) -> Tensor
torch.sinh(a : int) -> float
torch.sinh(a : float) -> float
torch.sinh(a : number) -> number
torch.sinh_(self : Tensor) -> Tensor
torch.slogdet(self : Tensor) -> Tuple[Tensor, Tensor]
torch.smm(self : Tensor,
mat2 : Tensor) -> Tensor
torch.softmax(self : Tensor,
dim : int,
dtype : Optional[int]) -> Tensor
torch.softmax(self : Tensor,
dim : str,
dtype : Optional[int]) -> Tensor
torch.solve(self : Tensor,
A : Tensor) -> Tuple[Tensor, Tensor]
torch.solve(self : Tensor,
A : Tensor,
solution : Tensor,
lu : Tensor) -> Tuple[Tensor, Tensor]
torch.sort(self : Tensor,
dim : int=-1,
descending : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.sort(self : Tensor,
dim : int=-1,
descending : bool=False) -> Tuple[Tensor, Tensor]
torch.sort(self : Tensor,
dim : str,
descending : bool=False,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.sort(self : Tensor,
dim : str,
descending : bool=False) -> Tuple[Tensor, Tensor]
torch.sort(self : List[int],
reverse : bool=False) -> Tuple[]
torch.sort(self : List[float],
reverse : bool=False) -> Tuple[]
torch.sort(self : List[Tensor],
reverse : bool=False) -> Tuple[]
torch.sort(self : List[bool],
reverse : bool=False) -> Tuple[]
torch.sort(self : List[str],
reverse : bool=False) -> Tuple[]
torch.sort(self : List[t],
reverse : bool=False) -> Tuple[]
torch.sparse_coo_tensor(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]=False) -> Tensor
torch.sparse_coo_tensor(indices : Tensor,
values : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.sparse_coo_tensor(indices : Tensor,
values : Tensor,
size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.split(self : Tensor,
split_size : int,
dim : int=0) -> List[Tensor]
torch.split(self : str,
separator : Optional[str],
max : int=-1) -> List[str]
torch.split(self : Tensor,
split_sizes : List[int],
dim : int=0) -> List[Tensor]
torch.split_with_sizes(self : Tensor,
split_sizes : List[int],
dim : int=0) -> List[Tensor]
torch.sqrt(self : Tensor) -> Tensor
torch.sqrt(self : Tensor,
out : Tensor) -> Tensor
torch.sqrt(a : int) -> float
torch.sqrt(a : float) -> float
torch.sqrt(a : number) -> number
torch.sqrt_(self : Tensor) -> Tensor
torch.square(self : Tensor) -> Tensor
torch.square_(self : Tensor) -> Tensor
torch.squeeze(self : Tensor) -> Tensor
torch.squeeze(self : Tensor,
dim : int) -> Tensor
torch.squeeze(self : Tensor,
dim : str) -> Tensor
torch.sspaddmm(self : Tensor,
mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1,
out : Tensor) -> Tensor
torch.sspaddmm(self : Tensor,
mat1 : Tensor,
mat2 : Tensor,
beta : number=1,
alpha : number=1) -> Tensor
torch.stack(tensors : List[Tensor],
dim : int=0) -> Tensor
torch.stack(tensors : List[Tensor],
dim : int=0,
out : Tensor) -> Tensor
torch.std(self : Tensor,
unbiased : bool=True) -> Tensor
torch.std(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
torch.std(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
torch.std(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.std(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.std_mean(self : Tensor,
unbiased : bool=True) -> Tuple[Tensor, Tensor]
torch.std_mean(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.std_mean(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.sub(self : Tensor,
other : Tensor,
alpha : number=1) -> Tensor
torch.sub(self : Tensor,
other : number,
alpha : number=1) -> Tensor
torch.sub(self : Tensor,
other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
torch.sub(a : int,
b : int) -> int
torch.sub(a : float,
b : float) -> float
torch.sub(a : int,
b : float) -> float
torch.sub(a : float,
b : int) -> float
torch.sub(a : number,
b : number) -> number
torch.subtract(self : Tensor,
other : Tensor,
alpha : number=1,
out : Tensor) -> Tensor
torch.subtract(self : Tensor,
other : Tensor,
alpha : number=1) -> Tensor
torch.subtract(self : Tensor,
other : number,
alpha : number=1) -> Tensor
torch.sum(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.sum(self : Tensor,
dtype : Optional[int]) -> Tensor
torch.sum(self : Tensor,
dim : List[str],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch.sum(self : Tensor,
dim : List[str],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.sum(self : Tensor,
dim : List[int],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch.svd(self : Tensor,
some : bool=True,
compute_uv : bool=True,
U : Tensor,
S : Tensor,
V : Tensor) -> Tuple[Tensor, Tensor, Tensor]
torch.svd(self : Tensor,
some : bool=True,
compute_uv : bool=True) -> Tuple[Tensor, Tensor, Tensor]
torch.swapaxes(self : Tensor,
axis0 : int,
axis1 : int) -> Tensor
torch.swapdims(self : Tensor,
dim0 : int,
dim1 : int) -> Tensor
torch.symeig(self : Tensor,
eigenvectors : bool=False,
upper : bool=True,
e : Tensor,
V : Tensor) -> Tuple[Tensor, Tensor]
torch.symeig(self : Tensor,
eigenvectors : bool=False,
upper : bool=True) -> Tuple[Tensor, Tensor]
torch.t(self : Tensor) -> Tensor
torch.take(self : Tensor,
index : Tensor,
out : Tensor) -> Tensor
torch.take(self : Tensor,
index : Tensor) -> Tensor
torch.tan(self : Tensor) -> Tensor
torch.tan(self : Tensor,
out : Tensor) -> Tensor
torch.tan(a : int) -> float
torch.tan(a : float) -> float
torch.tan(a : number) -> number
torch.tan_(self : Tensor) -> Tensor
torch.tanh(self : Tensor) -> Tensor
torch.tanh(self : Tensor,
out : Tensor) -> Tensor
torch.tanh(a : int) -> float
torch.tanh(a : float) -> float
torch.tanh(a : number) -> number
torch.tanh_(self : Tensor) -> Tensor
torch.tensor(t : float,
dtype : Optional[int],
device : Optional[Device],
requires_grad : bool=False) -> Tensor
torch.tensor(t : int,
dtype : Optional[int],
device : Optional[Device],
requires_grad : bool=False) -> Tensor
torch.tensor(t : bool,
dtype : Optional[int],
device : Optional[Device],
requires_grad : bool=False) -> Tensor
torch.tensor(data : List[t],
dtype : Optional[int],
device : Optional[Device],
requires_grad : bool=False) -> Tensor
torch.tensor_split(self : Tensor,
sections : int,
dim : int=0) -> List[Tensor]
torch.tensor_split(self : Tensor,
indices : List[int],
dim : int=0) -> List[Tensor]
torch.tensor_split(self : Tensor,
tensor_indices_or_sections : Tensor,
dim : int=0) -> List[Tensor]
torch.tensordot(self : Tensor,
other : Tensor,
dims_self : List[int],
dims_other : List[int]) -> Tensor
torch.tensordot(self : Tensor,
other : Tensor,
dims_self : List[int],
dims_other : List[int],
out : Tensor) -> Tensor
torch.threshold(self : Tensor,
threshold : number,
value : number) -> Tensor
torch.threshold(self : Tensor,
threshold : number,
value : number,
out : Tensor) -> Tensor
torch.threshold_(self : Tensor,
threshold : number,
value : number) -> Tensor
torch.tile(self : Tensor,
dims : List[int]) -> Tensor
torch.topk(self : Tensor,
k : int,
dim : int=-1,
largest : bool=True,
sorted : bool=True,
values : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch.topk(self : Tensor,
k : int,
dim : int=-1,
largest : bool=True,
sorted : bool=True) -> Tuple[Tensor, Tensor]
torch.trace(self : Tensor) -> Tensor
torch.transpose(self : Tensor,
dim0 : int,
dim1 : int) -> Tensor
torch.transpose(self : Tensor,
dim0 : str,
dim1 : str) -> Tensor
torch.trapz(y : Tensor,
x : Tensor,
dim : int=-1) -> Tensor
torch.trapz(y : Tensor,
dx : float=1.0,
dim : int=-1) -> Tensor
torch.triangular_solve(self : Tensor,
A : Tensor,
upper : bool=True,
transpose : bool=False,
unitriangular : bool=False,
X : Tensor,
M : Tensor) -> Tuple[Tensor, Tensor]
torch.triangular_solve(self : Tensor,
A : Tensor,
upper : bool=True,
transpose : bool=False,
unitriangular : bool=False) -> Tuple[Tensor, Tensor]
torch.tril(self : Tensor,
diagonal : int=0,
out : Tensor) -> Tensor
torch.tril(self : Tensor,
diagonal : int=0) -> Tensor
torch.tril_indices(row : int,
col : int,
offset : int=0,
dtype : Optional[int]=4,
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.triplet_margin_loss(anchor : Tensor,
positive : Tensor,
negative : Tensor,
margin : float=1.0,
p : float=2.0,
eps : float=1e-06,
swap : bool=False,
reduction : int=1) -> Tensor
torch.triu(self : Tensor,
diagonal : int=0,
out : Tensor) -> Tensor
torch.triu(self : Tensor,
diagonal : int=0) -> Tensor
torch.triu_indices(row : int,
col : int,
offset : int=0,
dtype : Optional[int]=4,
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.true_divide(self : Tensor,
other : number) -> Tensor
torch.true_divide(self : Tensor,
other : Tensor) -> Tensor
torch.true_divide(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.trunc(self : Tensor) -> Tensor
torch.trunc(self : Tensor,
out : Tensor) -> Tensor
torch.trunc_(self : Tensor) -> Tensor
torch.unbind(self : Tensor,
dim : int=0) -> List[Tensor]
torch.unbind(self : Tensor,
dim : str) -> List[Tensor]
torch.unsafe_chunk(self : Tensor,
chunks : int,
dim : int=0) -> List[Tensor]
torch.unsafe_split(self : Tensor,
split_size : int,
dim : int=0) -> List[Tensor]
torch.unsafe_split_with_sizes(self : Tensor,
split_sizes : List[int],
dim : int=0) -> List[Tensor]
torch.unsqueeze(self : Tensor,
dim : int) -> Tensor
torch.vander(x : Tensor,
N : Optional[int],
increasing : bool=False) -> Tensor
torch.var(self : Tensor,
unbiased : bool=True) -> Tensor
torch.var(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
torch.var(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tensor
torch.var(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.var(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False,
out : Tensor) -> Tensor
torch.var_mean(self : Tensor,
unbiased : bool=True) -> Tuple[Tensor, Tensor]
torch.var_mean(self : Tensor,
dim : List[int],
unbiased : bool=True,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.var_mean(self : Tensor,
dim : List[str],
unbiased : bool=True,
keepdim : bool=False) -> Tuple[Tensor, Tensor]
torch.vdot(self : Tensor,
other : Tensor) -> Tensor
torch.vdot(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.view_as_complex(self : Tensor) -> Tensor
torch.view_as_real(self : Tensor) -> Tensor
torch.vstack(tensors : List[Tensor]) -> Tensor
torch.vstack(tensors : List[Tensor],
out : Tensor) -> Tensor
torch.wait(self : Future[t]) -> t
torch.where(condition : Tensor,
self : Tensor,
other : Tensor) -> Tensor
torch.where(condition : Tensor,
self : number,
other : Tensor) -> Tensor
torch.where(condition : Tensor,
self : Tensor,
other : number) -> Tensor
torch.where(condition : Tensor,
self : number,
other : number) -> Tensor
torch.where(condition : Tensor) -> List[Tensor]
torch.xlogy(self : Tensor,
other : Tensor) -> Tensor
torch.xlogy(self : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch.xlogy(self : number,
other : Tensor) -> Tensor
torch.xlogy(self : number,
other : Tensor,
out : Tensor) -> Tensor
torch.xlogy(self : Tensor,
other : number) -> Tensor
torch.xlogy(self : Tensor,
other : number,
out : Tensor) -> Tensor
torch.xlogy_(self : Tensor,
other : Tensor) -> Tensor
torch.xlogy_(self : Tensor,
other : number) -> Tensor
torch.zero_(self : Tensor) -> Tensor
torch.zeros(size : List[int],
names : Optional[List[str]],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.zeros(size : List[int],
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch.zeros(size : List[int],
out : Tensor) -> Tensor
torch.zeros_like(self : Tensor,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool],
memory_format : Optional[int]) -> Tensor
torch._C._nn.adaptive_avg_pool2d(self : Tensor,
output_size : List[int],
out : Tensor) -> Tensor
torch._C._nn.adaptive_avg_pool2d(self : Tensor,
output_size : List[int]) -> Tensor
torch._C._nn.adaptive_avg_pool3d(self : Tensor,
output_size : List[int],
out : Tensor) -> Tensor
torch._C._nn.adaptive_avg_pool3d(self : Tensor,
output_size : List[int]) -> Tensor
torch._C._nn.adaptive_max_pool2d(self : Tensor,
output_size : List[int],
out : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.adaptive_max_pool2d(self : Tensor,
output_size : List[int]) -> Tuple[Tensor, Tensor]
torch._C._nn.adaptive_max_pool3d(self : Tensor,
output_size : List[int],
out : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.adaptive_max_pool3d(self : Tensor,
output_size : List[int]) -> Tuple[Tensor, Tensor]
torch._C._nn.avg_pool2d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
ceil_mode : bool=False,
count_include_pad : bool=True,
divisor_override : Optional[int],
out : Tensor) -> Tensor
torch._C._nn.avg_pool2d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
ceil_mode : bool=False,
count_include_pad : bool=True,
divisor_override : Optional[int]) -> Tensor
torch._C._nn.avg_pool3d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
ceil_mode : bool=False,
count_include_pad : bool=True,
divisor_override : Optional[int],
out : Tensor) -> Tensor
torch._C._nn.avg_pool3d(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
ceil_mode : bool=False,
count_include_pad : bool=True,
divisor_override : Optional[int]) -> Tensor
torch._C._nn.binary_cross_entropy(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1) -> Tensor
torch._C._nn.binary_cross_entropy(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.col2im(self : Tensor,
output_size : List[int],
kernel_size : List[int],
dilation : List[int],
padding : List[int],
stride : List[int],
out : Tensor) -> Tensor
torch._C._nn.col2im(self : Tensor,
output_size : List[int],
kernel_size : List[int],
dilation : List[int],
padding : List[int],
stride : List[int]) -> Tensor
torch._C._nn.elu(self : Tensor,
alpha : number=1,
scale : number=1,
input_scale : number=1,
out : Tensor) -> Tensor
torch._C._nn.elu(self : Tensor,
alpha : number=1,
scale : number=1,
input_scale : number=1) -> Tensor
torch._C._nn.elu_(self : Tensor,
alpha : number=1,
scale : number=1,
input_scale : number=1) -> Tensor
torch._C._nn.fractional_max_pool2d(self : Tensor,
kernel_size : List[int],
output_size : List[int],
random_samples : Tensor,
output : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.fractional_max_pool2d(self : Tensor,
kernel_size : List[int],
output_size : List[int],
random_samples : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.fractional_max_pool3d(self : Tensor,
kernel_size : List[int],
output_size : List[int],
random_samples : Tensor,
output : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.fractional_max_pool3d(self : Tensor,
kernel_size : List[int],
output_size : List[int],
random_samples : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.gelu(self : Tensor) -> Tensor
torch._C._nn.glu(self : Tensor,
dim : int=-1,
out : Tensor) -> Tensor
torch._C._nn.glu(self : Tensor,
dim : int=-1) -> Tensor
torch._C._nn.hardsigmoid(self : Tensor,
out : Tensor) -> Tensor
torch._C._nn.hardsigmoid(self : Tensor) -> Tensor
torch._C._nn.hardsigmoid_(self : Tensor) -> Tensor
torch._C._nn.hardswish(self : Tensor,
out : Tensor) -> Tensor
torch._C._nn.hardswish(self : Tensor) -> Tensor
torch._C._nn.hardswish_(self : Tensor) -> Tensor
torch._C._nn.hardtanh(self : Tensor,
min_val : number=-1,
max_val : number=1,
out : Tensor) -> Tensor
torch._C._nn.hardtanh(self : Tensor,
min_val : number=-1,
max_val : number=1) -> Tensor
torch._C._nn.hardtanh_(self : Tensor,
min_val : number=-1,
max_val : number=1) -> Tensor
torch._C._nn.im2col(self : Tensor,
kernel_size : List[int],
dilation : List[int],
padding : List[int],
stride : List[int],
out : Tensor) -> Tensor
torch._C._nn.im2col(self : Tensor,
kernel_size : List[int],
dilation : List[int],
padding : List[int],
stride : List[int]) -> Tensor
torch._C._nn.l1_loss(self : Tensor,
target : Tensor,
reduction : int=1) -> Tensor
torch._C._nn.l1_loss(self : Tensor,
target : Tensor,
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.leaky_relu(self : Tensor,
negative_slope : number=0.01,
out : Tensor) -> Tensor
torch._C._nn.leaky_relu(self : Tensor,
negative_slope : number=0.01) -> Tensor
torch._C._nn.leaky_relu_(self : Tensor,
negative_slope : number=0.01) -> Tensor
torch._C._nn.linear(input : Tensor,
weight : Tensor,
bias : Optional[Tensor]) -> Tensor
torch._C._nn.log_sigmoid(self : Tensor,
out : Tensor) -> Tensor
torch._C._nn.log_sigmoid(self : Tensor) -> Tensor
torch._C._nn.max_pool2d_with_indices(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
ceil_mode : bool=False) -> Tuple[Tensor, Tensor]
torch._C._nn.max_pool2d_with_indices(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
ceil_mode : bool=False,
out : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.max_pool3d_with_indices(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
ceil_mode : bool=False) -> Tuple[Tensor, Tensor]
torch._C._nn.max_pool3d_with_indices(self : Tensor,
kernel_size : List[int],
stride : List[int]=[],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
ceil_mode : bool=False,
out : Tensor,
indices : Tensor) -> Tuple[Tensor, Tensor]
torch._C._nn.max_unpool2d(self : Tensor,
indices : Tensor,
output_size : List[int],
out : Tensor) -> Tensor
torch._C._nn.max_unpool2d(self : Tensor,
indices : Tensor,
output_size : List[int]) -> Tensor
torch._C._nn.max_unpool3d(self : Tensor,
indices : Tensor,
output_size : List[int],
stride : List[int],
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.max_unpool3d(self : Tensor,
indices : Tensor,
output_size : List[int],
stride : List[int],
padding : List[int]) -> Tensor
torch._C._nn.mkldnn_linear(self : Tensor,
weight : Tensor,
bias : Optional[Tensor]) -> Tensor
torch._C._nn.mkldnn_reorder_conv2d_weight(self : Tensor,
padding : List[int]=[0, 0],
stride : List[int]=[1, 1],
dilation : List[int]=[1, 1],
groups : int=1) -> Tensor
torch._C._nn.mkldnn_reorder_conv3d_weight(self : Tensor,
padding : List[int]=[0, 0, 0],
stride : List[int]=[1, 1, 1],
dilation : List[int]=[1, 1, 1],
groups : int=1) -> Tensor
torch._C._nn.mse_loss(self : Tensor,
target : Tensor,
reduction : int=1) -> Tensor
torch._C._nn.mse_loss(self : Tensor,
target : Tensor,
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.multi_margin_loss(self : Tensor,
target : Tensor,
p : number=1,
margin : number=1,
weight : Optional[Tensor],
reduction : int=1) -> Tensor
torch._C._nn.multi_margin_loss(self : Tensor,
target : Tensor,
p : number=1,
margin : number=1,
weight : Optional[Tensor],
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.multilabel_margin_loss(self : Tensor,
target : Tensor,
reduction : int=1) -> Tensor
torch._C._nn.multilabel_margin_loss(self : Tensor,
target : Tensor,
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.nll_loss(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1,
ignore_index : int=-100) -> Tensor
torch._C._nn.nll_loss(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1,
ignore_index : int=-100,
out : Tensor) -> Tensor
torch._C._nn.nll_loss2d(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1,
ignore_index : int=-100) -> Tensor
torch._C._nn.nll_loss2d(self : Tensor,
target : Tensor,
weight : Optional[Tensor],
reduction : int=1,
ignore_index : int=-100,
out : Tensor) -> Tensor
torch._C._nn.one_hot(self : Tensor,
num_classes : int=-1) -> Tensor
torch._C._nn.reflection_pad1d(self : Tensor,
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.reflection_pad1d(self : Tensor,
padding : List[int]) -> Tensor
torch._C._nn.reflection_pad2d(self : Tensor,
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.reflection_pad2d(self : Tensor,
padding : List[int]) -> Tensor
torch._C._nn.replication_pad1d(self : Tensor,
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.replication_pad1d(self : Tensor,
padding : List[int]) -> Tensor
torch._C._nn.replication_pad2d(self : Tensor,
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.replication_pad2d(self : Tensor,
padding : List[int]) -> Tensor
torch._C._nn.replication_pad3d(self : Tensor,
padding : List[int],
out : Tensor) -> Tensor
torch._C._nn.replication_pad3d(self : Tensor,
padding : List[int]) -> Tensor
torch._C._nn.rrelu_with_noise(self : Tensor,
noise : Tensor,
lower : number=0.125,
upper : number=0.3333333333333333,
training : bool=False,
generator : Optional[Generator],
out : Tensor) -> Tensor
torch._C._nn.rrelu_with_noise(self : Tensor,
noise : Tensor,
lower : number=0.125,
upper : number=0.3333333333333333,
training : bool=False,
generator : Optional[Generator]) -> Tensor
torch._C._nn.rrelu_with_noise_(self : Tensor,
noise : Tensor,
lower : number=0.125,
upper : number=0.3333333333333333,
training : bool=False,
generator : Optional[Generator]) -> Tensor
torch._C._nn.silu(self : Tensor,
out : Tensor) -> Tensor
torch._C._nn.silu(self : Tensor) -> Tensor
torch._C._nn.silu_(self : Tensor) -> Tensor
torch._C._nn.slow_conv3d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
out : Tensor) -> Tensor
torch._C._nn.slow_conv3d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0]) -> Tensor
torch._C._nn.slow_conv_dilated2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1]) -> Tensor
torch._C._nn.slow_conv_dilated3d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1]) -> Tensor
torch._C._nn.slow_conv_transpose2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
output_padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
out : Tensor) -> Tensor
torch._C._nn.slow_conv_transpose2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
output_padding : List[int]=[0, 0],
dilation : List[int]=[1, 1]) -> Tensor
torch._C._nn.slow_conv_transpose3d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
output_padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1],
out : Tensor) -> Tensor
torch._C._nn.slow_conv_transpose3d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1, 1],
padding : List[int]=[0, 0, 0],
output_padding : List[int]=[0, 0, 0],
dilation : List[int]=[1, 1, 1]) -> Tensor
torch._C._nn.smooth_l1_loss(self : Tensor,
target : Tensor,
reduction : int=1,
beta : float=1.0) -> Tensor
torch._C._nn.smooth_l1_loss(self : Tensor,
target : Tensor,
reduction : int=1,
beta : float=1.0,
out : Tensor) -> Tensor
torch._C._nn.soft_margin_loss(self : Tensor,
target : Tensor,
reduction : int=1) -> Tensor
torch._C._nn.soft_margin_loss(self : Tensor,
target : Tensor,
reduction : int=1,
out : Tensor) -> Tensor
torch._C._nn.softplus(self : Tensor,
beta : number=1,
threshold : number=20) -> Tensor
torch._C._nn.softplus(self : Tensor,
beta : number=1,
threshold : number=20,
out : Tensor) -> Tensor
torch._C._nn.softshrink(self : Tensor,
lambd : number=0.5,
out : Tensor) -> Tensor
torch._C._nn.softshrink(self : Tensor,
lambd : number=0.5) -> Tensor
torch._C._nn.thnn_conv2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
out : Tensor) -> Tensor
torch._C._nn.thnn_conv2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0]) -> Tensor
torch._C._nn.thnn_conv_depthwise2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1],
out : Tensor) -> Tensor
torch._C._nn.thnn_conv_depthwise2d(self : Tensor,
weight : Tensor,
kernel_size : List[int],
bias : Optional[Tensor],
stride : List[int]=[1, 1],
padding : List[int]=[0, 0],
dilation : List[int]=[1, 1]) -> Tensor
torch._C._nn.upsample_bicubic2d(input : Tensor,
output_size : Optional[List[int]],
align_corners : bool,
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_bicubic2d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_h : Optional[float],
scales_w : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_bicubic2d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_h : Optional[float],
scales_w : Optional[float]) -> Tensor
torch._C._nn.upsample_bilinear2d(input : Tensor,
output_size : Optional[List[int]],
align_corners : bool,
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_bilinear2d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_h : Optional[float],
scales_w : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_bilinear2d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_h : Optional[float],
scales_w : Optional[float]) -> Tensor
torch._C._nn.upsample_linear1d(input : Tensor,
output_size : Optional[List[int]],
align_corners : bool,
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_linear1d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_linear1d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales : Optional[float]) -> Tensor
torch._C._nn.upsample_nearest1d(self : Tensor,
output_size : List[int],
scales : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_nearest1d(self : Tensor,
output_size : List[int],
scales : Optional[float]) -> Tensor
torch._C._nn.upsample_nearest1d(input : Tensor,
output_size : Optional[List[int]],
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_nearest2d(self : Tensor,
output_size : List[int],
scales_h : Optional[float],
scales_w : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_nearest2d(self : Tensor,
output_size : List[int],
scales_h : Optional[float],
scales_w : Optional[float]) -> Tensor
torch._C._nn.upsample_nearest2d(input : Tensor,
output_size : Optional[List[int]],
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_nearest3d(input : Tensor,
output_size : Optional[List[int]],
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_nearest3d(self : Tensor,
output_size : List[int],
scales_d : Optional[float],
scales_h : Optional[float],
scales_w : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_nearest3d(self : Tensor,
output_size : List[int],
scales_d : Optional[float],
scales_h : Optional[float],
scales_w : Optional[float]) -> Tensor
torch._C._nn.upsample_trilinear3d(input : Tensor,
output_size : Optional[List[int]],
align_corners : bool,
scale_factors : Optional[List[float]]) -> Tensor
torch._C._nn.upsample_trilinear3d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_d : Optional[float],
scales_h : Optional[float],
scales_w : Optional[float],
out : Tensor) -> Tensor
torch._C._nn.upsample_trilinear3d(self : Tensor,
output_size : List[int],
align_corners : bool,
scales_d : Optional[float],
scales_h : Optional[float],
scales_w : Optional[float]) -> Tensor
torch._C._fft.fft_fft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_fft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_fft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_fft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_fftfreq(n : int,
d : float=1.0,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch._C._fft.fft_fftfreq(n : int,
d : float=1.0,
out : Tensor) -> Tensor
torch._C._fft.fft_fftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_fftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_fftshift(self : Tensor,
dim : Optional[List[int]]) -> Tensor
torch._C._fft.fft_hfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_hfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_ifft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_ifft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_ifft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_ifft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_ifftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_ifftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_ifftshift(self : Tensor,
dim : Optional[List[int]]) -> Tensor
torch._C._fft.fft_ihfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_ihfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_irfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_irfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_irfft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_irfft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_irfftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_irfftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_rfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str]) -> Tensor
torch._C._fft.fft_rfft(self : Tensor,
n : Optional[int],
dim : int=-1,
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_rfft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_rfft2(self : Tensor,
s : Optional[List[int]],
dim : List[int]=[-2, -1],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._fft.fft_rfftfreq(n : int,
d : float=1.0,
dtype : Optional[int],
layout : Optional[int],
device : Optional[Device],
pin_memory : Optional[bool]) -> Tensor
torch._C._fft.fft_rfftfreq(n : int,
d : float=1.0,
out : Tensor) -> Tensor
torch._C._fft.fft_rfftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str]) -> Tensor
torch._C._fft.fft_rfftn(self : Tensor,
s : Optional[List[int]],
dim : Optional[List[int]],
norm : Optional[str],
out : Tensor) -> Tensor
torch._C._linalg.linalg_cholesky(self : Tensor) -> Tensor
torch._C._linalg.linalg_cholesky(self : Tensor,
out : Tensor) -> Tensor
torch._C._linalg.linalg_cond(self : Tensor,
p : Optional[number]) -> Tensor
torch._C._linalg.linalg_cond(self : Tensor,
p : Optional[number],
out : Tensor) -> Tensor
torch._C._linalg.linalg_cond(self : Tensor,
p : str) -> Tensor
torch._C._linalg.linalg_cond(self : Tensor,
p : str,
out : Tensor) -> Tensor
torch._C._linalg.linalg_det(self : Tensor) -> Tensor
torch._C._linalg.linalg_eigh(self : Tensor,
UPLO : str=L) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_eigh(self : Tensor,
UPLO : str=L,
eigvals : Tensor,
eigvecs : Tensor) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_eigvalsh(self : Tensor,
UPLO : str=L) -> Tensor
torch._C._linalg.linalg_eigvalsh(self : Tensor,
UPLO : str=L,
out : Tensor) -> Tensor
torch._C._linalg.linalg_inv(self : Tensor) -> Tensor
torch._C._linalg.linalg_inv(self : Tensor,
out : Tensor) -> Tensor
torch._C._linalg.linalg_matrix_rank(self : Tensor,
tol : Optional[float],
hermitian : bool=False) -> Tensor
torch._C._linalg.linalg_matrix_rank(self : Tensor,
tol : Optional[float],
hermitian : bool=False,
out : Tensor) -> Tensor
torch._C._linalg.linalg_norm(self : Tensor,
ord : Optional[number],
dim : Optional[List[int]],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch._C._linalg.linalg_norm(self : Tensor,
ord : Optional[number],
dim : Optional[List[int]],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch._C._linalg.linalg_norm(self : Tensor,
ord : str,
dim : Optional[List[int]],
keepdim : bool=False,
dtype : Optional[int]) -> Tensor
torch._C._linalg.linalg_norm(self : Tensor,
ord : str,
dim : Optional[List[int]],
keepdim : bool=False,
dtype : Optional[int],
out : Tensor) -> Tensor
torch._C._linalg.linalg_pinv(self : Tensor,
rcond : float=1e-15,
hermitian : bool=False) -> Tensor
torch._C._linalg.linalg_pinv(self : Tensor,
rcond : float=1e-15,
hermitian : bool=False,
out : Tensor) -> Tensor
torch._C._linalg.linalg_pinv(self : Tensor,
rcond : Tensor,
hermitian : bool=False) -> Tensor
torch._C._linalg.linalg_pinv(self : Tensor,
rcond : Tensor,
hermitian : bool=False,
out : Tensor) -> Tensor
torch._C._linalg.linalg_qr(self : Tensor,
mode : str=reduced) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_qr(self : Tensor,
mode : str=reduced,
Q : Tensor,
R : Tensor) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_slogdet(self : Tensor) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_slogdet(self : Tensor,
sign : Tensor,
logabsdet : Tensor) -> Tuple[Tensor, Tensor]
torch._C._linalg.linalg_solve(input : Tensor,
other : Tensor) -> Tensor
torch._C._linalg.linalg_solve(input : Tensor,
other : Tensor,
out : Tensor) -> Tensor
torch._C._linalg.linalg_svd(self : Tensor,
full_matrices : bool=True,
compute_uv : bool=True,
U : Tensor,
S : Tensor,
V : Tensor) -> Tuple[Tensor, Tensor, Tensor]
torch._C._linalg.linalg_svd(self : Tensor,
full_matrices : bool=True,
compute_uv : bool=True) -> Tuple[Tensor, Tensor, Tensor]
torch._C._linalg.linalg_tensorinv(self : Tensor,
ind : int=2) -> Tensor
torch._C._linalg.linalg_tensorinv(self : Tensor,
ind : int=2,
out : Tensor) -> Tensor
torch._C._linalg.linalg_tensorsolve(self : Tensor,
other : Tensor,
dims : Optional[List[int]]) -> Tensor
torch._C._linalg.linalg_tensorsolve(self : Tensor,
other : Tensor,
dims : Optional[List[int]],
out : Tensor) -> Tensor
TorchScript Builtin Functions¶
collections.OrderedDict(inputs : List[Tuple[str, tVal]]) -> Dict[str, tVal]
collections.OrderedDict(inputs : List[Tuple[int, tVal]]) -> Dict[int, tVal]
collections.OrderedDict(inputs : List[Tuple[bool, tVal]]) -> Dict[bool, tVal]
collections.OrderedDict(inputs : List[Tuple[float, tVal]]) -> Dict[float, tVal]
collections.OrderedDict(inputs : List[Tuple[complex, tVal]]) -> Dict[complex, tVal]
collections.OrderedDict(inputs : List[Tuple[Tensor, tVal]]) -> Dict[Tensor, tVal]
collections.OrderedDict() -> Dict[str, Tensor]
builtins.dict(inputs : List[Tuple[str, tVal]]) -> Dict[str, tVal]
builtins.dict(inputs : List[Tuple[int, tVal]]) -> Dict[int, tVal]
builtins.dict(inputs : List[Tuple[bool, tVal]]) -> Dict[bool, tVal]
builtins.dict(inputs : List[Tuple[float, tVal]]) -> Dict[float, tVal]
builtins.dict(inputs : List[Tuple[complex, tVal]]) -> Dict[complex, tVal]
builtins.dict(inputs : List[Tuple[Tensor, tVal]]) -> Dict[Tensor, tVal]
builtins.dict() -> Dict[str, Tensor]
torch.backends.cudnn.is_acceptable(self : Tensor) -> bool
torch.autograd.grad(outputs : List[Tensor],
inputs : List[Tensor],
grad_outputs : Optional[List[Optional[Tensor]]],
retain_graph : Optional[bool],
create_graph : bool=False,
allow_unused : bool=False) -> List[Optional[Tensor]]
torch.autograd.backward(self : Tensor,
gradient : Optional[Tensor],
retain_graph : Optional[bool],
create_graph : bool=False) -> Tuple[]
torch.autograd.backward(tensors : List[Tensor],
grad_tensors : Optional[List[Optional[Tensor]]],
retain_graph : Optional[bool],
create_graph : bool=False) -> Tuple[]
torch.Size(sizes : List[int]) -> List[int]
torch.functional.align_tensors(tensors : List[Tensor]) -> List[Tensor]
torch.functional.atleast_1d(self : Tensor) -> Tensor
torch.functional.atleast_1d(tensors : List[Tensor]) -> List[Tensor]
torch.functional.atleast_2d(self : Tensor) -> Tensor
torch.functional.atleast_2d(tensors : List[Tensor]) -> List[Tensor]
torch.functional.atleast_3d(self : Tensor) -> Tensor
torch.functional.atleast_3d(tensors : List[Tensor]) -> List[Tensor]
torch.functional.block_diag(tensors : List[Tensor]) -> Tensor
torch.functional.broadcast_tensors(tensors : List[Tensor]) -> List[Tensor]
torch.functional.cartesian_prod(tensors : List[Tensor]) -> Tensor
torch.functional.chain_matmul(matrices : List[Tensor]) -> Tensor
torch.device(a : str) -> Device
torch.functional.einsum(equation : str,
tensors : List[Tensor]) -> Tensor
torch.random.manual_seed(seed : int) -> Tuple[]
torch.functional.meshgrid(tensors : List[Tensor]) -> List[Tensor]
torch.qscheme(self : Tensor) -> QScheme
torch.serialization.save(item : t,
filename : str) -> Tuple[]
torch.autograd.grad_mode.set_grad_enabled(val : bool) -> Tuple[]
torch.functional.split(self : Tensor,
split_size : int,
dim : int=0) -> List[Tensor]
torch.functional.split(self : str,
separator : Optional[str],
max : int=-1) -> List[str]
torch.functional.split(self : Tensor,
split_sizes : List[int],
dim : int=0) -> List[Tensor]
torch.functional.tensordot(self : Tensor,
other : Tensor,
dims_self : List[int],
dims_other : List[int]) -> Tensor
torch.functional.tensordot(self : Tensor,
other : Tensor,
dims_self : List[int],
dims_other : List[int],
out : Tensor) -> Tensor
Python Built-in Functions¶
The functions in the following table are supported but do not have a static schema
Function |
Note |
---|---|
Print any value |
|
Lists cannot be converted to tuples with this method since their size is not statically known |
|
Attribute name must be a literal string |
|
Attribute name must be a literal string |
|
Result is static |
|
Can only be used as an iterator in a for loop |
|
Arguments must be iterable. See Iterables for details. |
|
Arguments must be iterable. See Iterables for details. |
The following functions will use the corresponding magic method on TorchScript classes
Function |
Magic Method |
---|---|
float |
|
int |
|
bool |
|
str |
|
len |
|
hex |
|
oct |
|
These built-in functions use the schema
float(a : Tensor) -> float
float(a : number) -> float
float(a : int) -> float
float(a : bool) -> float
float(a : str) -> float
int(a : Tensor) -> int
int(a : bool) -> int
int(a : float) -> int
int(a : number) -> int
int(a : str) -> int
bool(a : Tensor) -> bool
bool(a : int) -> bool
bool(a : float) -> bool
str(elem : t) -> str
len(a : List[t]) -> int
len(t : Tensor) -> int
len(s : str) -> int
len(self : Dict[str, t]) -> int
len(self : Dict[int, t]) -> int
len(self : Dict[bool, t]) -> int
len(self : Dict[float, t]) -> int
len(self : Dict[complex, t]) -> int
len(self : Dict[Tensor, t]) -> int
len(a : List[Any]) -> int
hex(i : int) -> str
oct(i : int) -> str
round(self : Tensor) -> Tensor
round(self : Tensor,
out : Tensor) -> Tensor
round(a : int) -> float
round(a : float) -> float
round(a : number) -> number
hash(value : t) -> int
min(a : int,
b : int) -> int
min(a : float,
b : float) -> float
min(a : int,
b : float) -> float
min(a : float,
b : int) -> float
min(a : number,
b : number) -> number
min(l : List[int],
r : List[int]) -> List[int]
min(self : List[int]) -> int
min(l : List[float],
r : List[float]) -> List[float]
min(self : List[float]) -> float
min(l : List[bool],
r : List[bool]) -> List[bool]
min(self : List[bool]) -> bool
max(a : int,
b : int) -> int
max(a : float,
b : float) -> float
max(a : int,
b : float) -> float
max(a : float,
b : int) -> float
max(a : number,
b : number) -> number
max(l : List[int],
r : List[int]) -> List[int]
max(self : List[int]) -> int
max(l : List[float],
r : List[float]) -> List[float]
max(self : List[float]) -> float
max(l : List[bool],
r : List[bool]) -> List[bool]
max(self : List[bool]) -> bool
abs(a : int) -> int
abs(a : float) -> float
abs(a : number) -> number
abs(x : Tensor) -> Tensor
all(self : Tensor) -> Tensor
all(self : Tensor,
dim : int,
keepdim : bool=False) -> Tensor
all(self : Tensor,
dim : int,
keepdim : bool=False,
out : Tensor) -> Tensor
all(self : Tensor,
dim : str,
keepdim : bool=False) -> Tensor
all(self : Tensor,
dim : str,
keepdim : bool=False,
out : Tensor) -> Tensor
all(self : List[int]) -> bool
all(self : List[float]) -> bool
all(self : List[bool]) -> bool
divmod(x : int,
y : int) -> Tuple[int, int]
divmod(x : float,
y : float) -> Tuple[float, float]
divmod(x : int,
y : float) -> Tuple[float, float]
divmod(x : float,
y : int) -> Tuple[float, float]
list(t : str) -> List[str]
list(l : List[t]) -> List[t]
ord(string : str) -> int
chr(i : int) -> str
bin(i : int) -> str
sorted(input : List[int]) -> List[int]
sorted(input : List[float]) -> List[float]
sorted(input : List[Tensor]) -> List[Tensor]
sorted(input : List[bool]) -> List[bool]
sorted(input : List[str]) -> List[str]
sorted(self : List[t]) -> List[t]
math
Module¶
aten::ceil.int(int a) -> (int)
aten::ceil.float(float a) -> (int)
aten::ceil.Scalar(Scalar a) -> (Scalar)
aten::copysign.int(int a, int b) -> (float)
aten::copysign.float(float a, float b) -> (float)
aten::copysign.int_float(int a, float b) -> (float)
aten::copysign.float_int(float a, int b) -> (float)
aten::copysign(Scalar a, Scalar b) -> (float)
aten::erf.int(int a) -> (float)
aten::erf.float(float a) -> (float)
aten::erf.Scalar(Scalar a) -> (Scalar)
aten::erfc.int(int a) -> (float)
aten::erfc.float(float a) -> (float)
aten::erfc.Scalar(Scalar a) -> (Scalar)
aten::exp.int(int a) -> (float)
aten::exp.float(float a) -> (float)
aten::exp.Scalar(Scalar a) -> (Scalar)
aten::expm1.int(int a) -> (float)
aten::expm1.float(float a) -> (float)
aten::expm1.Scalar(Scalar a) -> (Scalar)
aten::fabs.int(int a) -> (float)
aten::fabs.float(float a) -> (float)
aten::fabs.Scalar(Scalar a) -> (Scalar)
aten::floor.int(int a) -> (int)
aten::floor.float(float a) -> (int)
aten::floor.Scalar(Scalar a) -> (Scalar)
aten::gamma.int(int a) -> (float)
aten::gamma.float(float a) -> (float)
aten::gamma.Scalar(Scalar a) -> (Scalar)
aten::lgamma.int(int a) -> (float)
aten::lgamma.float(float a) -> (float)
aten::lgamma.Scalar(Scalar a) -> (Scalar)
aten::log.int(int a) -> (float)
aten::log.float(float a) -> (float)
aten::log.Scalar(Scalar a) -> (Scalar)
aten::log.int_int(int a, int b) -> (float)
aten::log.float_float(float a, float b) -> (float)
aten::log.int_float(int a, float b) -> (float)
aten::log.float_int(float a, int b) -> (float)
aten::log.Scalar_Scalar(Scalar a, Scalar b) -> (float)
aten::log10.int(int a) -> (float)
aten::log10.float(float a) -> (float)
aten::log10.Scalar(Scalar a) -> (Scalar)
aten::log1p.int(int a) -> (float)
aten::log1p.float(float a) -> (float)
aten::log1p.Scalar(Scalar a) -> (Scalar)
aten::pow.int(int a, int b) -> (float)
aten::pow.float(float a, float b) -> (float)
aten::pow.int_float(int a, float b) -> (float)
aten::pow.float_int(float a, int b) -> (float)
aten::pow.Scalar_Scalar(Scalar a, Scalar b) -> (float)
aten::pow.int_to_int(int a, int b) -> (int)
aten::sqrt.int(int a) -> (float)
aten::sqrt.float(float a) -> (float)
aten::sqrt.Scalar(Scalar a) -> (Scalar)
aten::isnan.float(float a) -> (bool)
aten::asinh.int(int a) -> (float)
aten::asinh.float(float a) -> (float)
aten::asinh.Scalar(Scalar a) -> (Scalar)
aten::atanh.int(int a) -> (float)
aten::atanh.float(float a) -> (float)
aten::atanh.Scalar(Scalar a) -> (Scalar)
aten::cosh.int(int a) -> (float)
aten::cosh.float(float a) -> (float)
aten::cosh.Scalar(Scalar a) -> (Scalar)
aten::sinh.int(int a) -> (float)
aten::sinh.float(float a) -> (float)
aten::sinh.Scalar(Scalar a) -> (Scalar)
aten::tanh.int(int a) -> (float)
aten::tanh.float(float a) -> (float)
aten::tanh.Scalar(Scalar a) -> (Scalar)
aten::acos.int(int a) -> (float)
aten::acos.float(float a) -> (float)
aten::acos.Scalar(Scalar a) -> (Scalar)
aten::asin.int(int a) -> (float)
aten::asin.float(float a) -> (float)
aten::asin.Scalar(Scalar a) -> (Scalar)
aten::atan.int(int a) -> (float)
aten::atan.float(float a) -> (float)
aten::atan.Scalar(Scalar a) -> (Scalar)
aten::atan2.int(int a, int b) -> (float)
aten::atan2.float(float a, float b) -> (float)
aten::atan2.int_float(int a, float b) -> (float)
aten::atan2.float_int(float a, int b) -> (float)
aten::atan2.Scalar_Scalar(Scalar a, Scalar b) -> (float)
aten::cos.int(int a) -> (float)
aten::cos.float(float a) -> (float)
aten::cos.Scalar(Scalar a) -> (Scalar)
aten::sin.int(int a) -> (float)
aten::sin.float(float a) -> (float)
aten::sin.Scalar(Scalar a) -> (Scalar)
aten::tan.int(int a) -> (float)
aten::tan.float(float a) -> (float)
aten::tan.Scalar(Scalar a) -> (Scalar)
aten::asinh.int(int a) -> (float)
aten::asinh.float(float a) -> (float)
aten::asinh.Scalar(Scalar a) -> (Scalar)
aten::atanh.int(int a) -> (float)
aten::atanh.float(float a) -> (float)
aten::atanh.Scalar(Scalar a) -> (Scalar)
aten::acosh.int(int a) -> (float)
aten::acosh.float(float a) -> (float)
aten::acosh.Scalar(Scalar a) -> (Scalar)
aten::sinh.int(int a) -> (float)
aten::sinh.float(float a) -> (float)
aten::sinh.Scalar(Scalar a) -> (Scalar)
aten::cosh.int(int a) -> (float)
aten::cosh.float(float a) -> (float)
aten::cosh.Scalar(Scalar a) -> (Scalar)
aten::tanh.int(int a) -> (float)
aten::tanh.float(float a) -> (float)
aten::tanh.Scalar(Scalar a) -> (Scalar)
aten::fmod.int(int a, int b) -> (float)
aten::fmod.float(float a, float b) -> (float)
aten::fmod.int_float(int a, float b) -> (float)
aten::fmod.float_int(float a, int b) -> (float)
aten::fmod(Scalar a, Scalar b) -> (float)
aten::modf(float a) -> (float, float)
aten::factorial.int(int a) -> (int)
aten::frexp(float a) -> (float, int)
aten::isnan.float(float a) -> (bool)
aten::isinf.float(float a) -> (bool)
aten::degrees.int(int a) -> (float)
aten::degrees.float(float a) -> (float)
aten::degrees.Scalar(Scalar a) -> (Scalar)
aten::radians.int(int a) -> (float)
aten::radians.float(float a) -> (float)
aten::radians.Scalar(Scalar a) -> (Scalar)
aten::ldexp(float x, int i) -> (float)
aten::gcd.int(int a, int b) -> (int)
aten::isfinite.float(float a) -> (bool)