id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
150,490 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _tranpose_padding(
x_shape, filter_shape, st... | null |
150,491 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _pad_before_conv(
x, filters, strides, paddi... | null |
150,492 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _x_dil_before_conv(x, dims, x_dilations):
def _p... | null |
150,493 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _tranpose_padding(
x_shape, filter_shape, st... | null |
150,494 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _x_dil_before_conv(x, dims, x_dilations):
# ... | null |
150,495 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _x_dil_before_conv(x, dims, x_dilations):
# ... | null |
150,496 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def _tranpose_padding(
x_shape, filter_shape, st... | null |
150,497 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
def scaled_dot_product_attention_v_2p0p0_and_above(... | null |
150,498 | from typing import Optional, Tuple, Union, Sequence
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
from ivy.functional.ivy.layers import _get_embed_dim, _handle_padding, _deconv_length
import ivy
from ivy.utils.exceptions import handle_... | null |
150,499 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
def as_native_dtype(
dtype_in: Union[torch.dtype, str, bool, int, floa... | null |
150,500 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
import ivy
from ivy.utils.exceptions import handle_exceptions
from ivy.fu... | null |
150,501 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
import ivy
from ivy.utils.exceptions import handle_exceptions
from ivy.fu... | null |
150,502 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
class Finfo:
def __init__(self, torch_finfo: torch.finfo):
sel... | null |
150,503 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
def as_native_dtype(
dtype_in: Union[torch.dtype, str, bool, int, floa... | null |
150,504 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
def as_ivy_dtype(
dtype_in: Union[torch.dtype, str, int, float, comple... | null |
150,505 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
def as_ivy_dtype(
dtype_in: Union[torch.dtype, str, int, float, comple... | null |
150,506 | from typing import Optional, Union, Sequence, List
import numpy as np
import torch
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from ivy.functional.ivy.data_type import _handle_nestable_dtype_info
from . import backend_version
ivy_dtype_dict = {
torch.int8: "int8",
torch.int16: "int16",
t... | null |
150,507 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,508 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,509 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,510 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,511 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,512 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,513 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,514 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,515 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,516 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,517 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,518 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,519 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,520 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,521 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,522 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,523 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,524 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,525 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,526 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,527 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
try:
import functorch
except ImportError:
functorch = () # for torch 1.10.1
import numpy as np
import torch
import ivy
from ivy.func_w... | null |
150,528 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,529 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,530 | from functools import reduce as _reduce
import functools
from numbers import Number
from operator import mul
from typing import Callable, List, Optional, Sequence, Tuple, Union
import numpy as np
import torch
import ivy
from ivy.func_wrapper import _update_torch_views, with_unsupported_dtypes
from ...ivy.general import... | null |
150,531 | import torch
import xformers.ops as xops
from ivy.func_wrapper import to_native_arrays_and_back
def scaled_dot_product_attention(
q,
k,
v,
scale: float,
/,
*,
mask=None,
out=None,
):
if isinstance(mask, torch.Tensor):
mask = torch.where(mask == 0, -torch.inf, 0)
return x... | null |
150,532 | import torch
import torchvision
from ivy.func_wrapper import to_native_arrays_and_back
def roi_align(
input, boxes, output_size, spatial_scale=1.0, sampling_ratio=-1, aligned=False
):
ret = torchvision.ops.roi_align(
input, boxes, output_size, spatial_scale, sampling_ratio, aligned
)
return ret | null |
150,533 | import torch
import torchvision
from ivy.func_wrapper import to_native_arrays_and_back
def nms(
boxes,
scores=None,
iou_threshold=0.5,
max_output_size=None,
score_threshold=float("-inf"),
):
# boxes (Tensor[N, 4])) – boxes to perform NMS on.
# They are expected to be in (x1, y1, x2, y2) for... | null |
150,534 | import torch
from typing import Callable
import ivy
from ivy.func_wrapper import inputs_to_native_arrays
from ivy.functional.ivy.gradients import (
_flatten_containers,
_rebuild_flattened_containers,
)
def inputs_to_native_arrays(fn: Callable) -> Callable:
def _inputs_to_native_arrays(*args, **kwargs):
... | null |
150,535 | import torch
from typing import Callable
import ivy
from ivy.func_wrapper import inputs_to_native_arrays
from ivy.functional.ivy.gradients import (
_flatten_containers,
_rebuild_flattened_containers,
)
def _flatten_containers(inputs):
"""Flatten containers into a single tuple of arrays.
Returns a flat... | null |
150,536 | import torch
from typing import Callable
import ivy
from ivy.func_wrapper import inputs_to_native_arrays
from ivy.functional.ivy.gradients import (
_flatten_containers,
_rebuild_flattened_containers,
)
def _flatten_containers(inputs):
"""Flatten containers into a single tuple of arrays.
Returns a flat... | null |
150,537 | import torch
from typing import Optional, Union
import ivy
def invert_permutation(
x: Union[torch.Tensor, list, tuple],
/,
) -> torch.Tensor:
x = torch.tensor(x) if not ivy.is_array(x) else x
sorted_indices = torch.argsort(x)
inverse = torch.zeros_like(sorted_indices)
inverse[sorted_indices] = ... | null |
150,538 | import torch
from typing import Optional, Union
import ivy
def lexsort(
keys: torch.Tensor, /, *, axis: int = -1, out: Optional[torch.Tensor] = None
) -> torch.Tensor:
shape = keys.size()
if len(shape) == 1:
_, result = torch.sort(keys, dim=axis, stable=True)
return result
if shape[0] =... | null |
150,539 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def l1_normalize(
x: torch.Tensor,
/,
*,
axis: Optional[int] = None,
out: Optional[torch.Tensor] = None,
) -> torch.Tensor:
return ... | null |
150,540 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def l2_normalize(
x: torch.Tensor,
/,
*,
axis: Optional[int] = None,
out: Optional[torch.Tensor] = None,
) -> torch.Tensor:
return ... | null |
150,541 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def local_response_norm(
x: torch.Tensor,
size,
/,
*,
bias: Optional[float] = 1.0,
alpha: Optional[float] = 1.0,
beta: Optional... | null |
150,542 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def batch_norm(
x: torch.Tensor,
mean: torch.Tensor,
variance: torch.Tensor,
/,
*,
scale: Optional[torch.Tensor] = None,
offset... | null |
150,543 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def instance_norm(
x: torch.Tensor,
mean: torch.Tensor,
variance: torch.Tensor,
/,
*,
scale: Optional[torch.Tensor] = None,
off... | null |
150,544 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def group_norm(
x: torch.Tensor,
num_groups: int = 1,
/,
*,
offset: Optional[torch.Tensor] = None,
scale: Optional[torch.Tensor] = ... | null |
150,545 | import torch
from typing import Literal, Optional, Tuple
from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes
from .. import backend_version
def lp_normalize(
x: torch.Tensor,
/,
*,
p: float = 2,
axis: Optional[int] = None,
out: Optional[torch.Tensor] = None,
) -> torch.T... | null |
150,546 | import ivy
from ivy.functional.ivy.experimental.sparse_array import (
_verify_bsr_components,
_verify_bsc_components,
_verify_coo_components,
_verify_csr_components,
_verify_csc_components,
_is_data_not_indices_values_and_shape,
)
import torch
def is_native_sparse_array(x):
return x.layout i... | null |
150,547 | import ivy
from ivy.functional.ivy.experimental.sparse_array import (
_verify_bsr_components,
_verify_bsc_components,
_verify_coo_components,
_verify_csr_components,
_verify_csc_components,
_is_data_not_indices_values_and_shape,
)
import torch
def native_sparse_array_to_indices_values_and_shape... | null |
150,548 | from typing import Optional, Tuple
import torch
def unravel_index(
indices: torch.Tensor,
shape: Tuple[int],
/,
*,
out: Optional[torch.Tensor] = None,
) -> Tuple[torch.Tensor]:
temp = indices.to(torch.int32)
output = []
for dim in reversed(shape):
output.append(temp % dim)
... | null |
150,549 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def diagflat(
x: torc... | null |
150,550 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def kron(
a: torch.Te... | null |
150,551 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def matrix_exp(
x: to... | null |
150,552 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def eig(
x: torch.Ten... | null |
150,553 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def eigvals(x: torch.Tens... | null |
150,554 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def _check_valid_dimensio... | null |
150,555 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def solve_triangular(
... | null |
150,556 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def multi_dot(
x: Seq... | null |
150,557 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def cond(
x: torch.Te... | null |
150,558 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def lu_factor(
x: tor... | null |
150,559 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def lu_solve(
lu: Tup... | null |
150,560 | import math
from collections import namedtuple
import torch
from typing import Optional, Tuple, Sequence, Union
import ivy
from ivy.func_wrapper import with_unsupported_dtypes
from .. import backend_version
from ivy.functional.ivy.experimental.linear_algebra import _check_valid_dimension_size
def dot(
a: torch.Ten... | null |
150,561 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def kaiser_window(
window_length: int,
periodic: bool = True,
beta: float = 12.0,
*,
dty... | null |
150,562 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def hamming_window(
window_length: int,
/,
*,
periodic: bool = True,
alpha: float = 0.54... | null |
150,563 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def vorbis_window(
window_length: torch.tensor,
*,
dtype: torch.dtype = torch.float32,
out: ... | null |
150,564 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def hann_window(
size: int,
/,
*,
periodic: bool = True,
dtype: Optional[torch.dtype] = ... | null |
150,565 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def tril_indices(
n_rows: int,
n_cols: Optional[int] = None,
k: int = 0,
/,
*,
devic... | null |
150,566 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def unsorted_segment_min(
data: torch.Tensor,
segment_ids: torch.Tensor,
num_segments: Union[int... | null |
150,567 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def blackman_window(
size: int,
/,
*,
periodic: bool = True,
dtype: Optional[torch.dtype... | null |
150,568 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def unsorted_segment_sum(
data: torch.Tensor,
segment_ids: torch.Tensor,
num_segments: Union[int... | null |
150,569 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def trilu(
x: torch.Tensor,
/,
*,
k: int = 0,
upper: bool = True,
out: Optional[torc... | null |
150,570 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def mel_weight_matrix(
num_mel_bins: int,
dft_length: int,
sample_rate: int,
lower_edge_hert... | null |
150,571 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def unsorted_segment_mean(
data: torch.Tensor,
segment_ids: torch.Tensor,
num_segments: Union[in... | null |
150,572 | from typing import Optional, Tuple, Union
import math
import torch
import ivy
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_unsupported_device_and_dtypes,
)
from .. import backend_version
def polyval(
coeffs: torch.Tensor,
x: torch.Tensor,
) -> torch.Tensor:
with ivy.PreciseMode(True... | null |
150,573 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def histogram(
a: torch.Tensor,
/,
*,
bins: Optional[Uni... | null |
150,574 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def quantile(
a: torch.Tensor,
q: Union[torch.Tensor, float],
... | null |
150,575 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def nanmean(
a: torch.Tensor,
/,
*,
axis: Optional[Union... | null |
150,576 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def nanmin(
a: torch.Tensor,
/,
*,
axis: Optional[Union[... | null |
150,577 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def _infer_dtype(dtype: torch.dtype) -> torch.dtype:
default_dtype =... | null |
150,578 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def corrcoef(
x: torch.Tensor,
/,
*,
y: Optional[torch.T... | null |
150,579 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def _nanmedian(input, axis, keepdims):
dtype = input.dtype
temp =... | null |
150,580 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def bincount(
x: torch.Tensor,
/,
*,
weights: Optional[t... | null |
150,581 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def igamma(
a: torch.Tensor,
/,
*,
x: torch.Tensor,
... | null |
150,582 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def cov(
x1: torch.Tensor,
x2: torch.Tensor = None,
/,
*... | null |
150,583 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def cummax(
x: torch.Tensor,
/,
*,
axis: int = 0,
ex... | null |
150,584 | from typing import Optional, Union, Tuple, Sequence
import torch
from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ..statistical import _infer_dtype
from copy import deepcopy
def _infer_dtype(dtype: torch.dtype) -> torch.dtype:
default_dtype =... | null |
150,585 | from typing import Optional
import torch
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_supported_device_and_dtypes,
with_supported_dtypes,
)
from . import backend_version
def l1_loss(
input: torch.Tensor,
target: torch.Tensor,
/,
*,
reduction: Optional[str] = "mean",
) ->... | null |
150,586 | from typing import Optional
import torch
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_supported_device_and_dtypes,
with_supported_dtypes,
)
from . import backend_version
def smooth_l1_loss(
input: torch.Tensor,
target: torch.Tensor,
/,
*,
beta: Optional[float] = 1.0,
... | null |
150,587 | from typing import Optional
import torch
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_supported_device_and_dtypes,
with_supported_dtypes,
)
from . import backend_version
def huber_loss(
input: torch.Tensor,
target: torch.Tensor,
/,
*,
reduction: Optional[str] = "mean",
... | null |
150,588 | from typing import Optional
import torch
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_supported_device_and_dtypes,
with_supported_dtypes,
)
from . import backend_version
def soft_margin_loss(
input: torch.Tensor,
target: torch.Tensor,
/,
*,
reduction: Optional[str] = "me... | null |
150,589 | from typing import Optional
import torch
from ivy.func_wrapper import (
with_unsupported_dtypes,
with_supported_device_and_dtypes,
with_supported_dtypes,
)
from . import backend_version
def kl_div(
input: torch.Tensor,
target: torch.Tensor,
/,
*,
reduction: Optional[str] = "mean",
l... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.