mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Closes https://github.com/pytorch/pytorch/issues/18724 Pull Request resolved: https://github.com/pytorch/pytorch/pull/19089 Differential Revision: D16073654 Pulled By: ezyang fbshipit-source-id: 5642179651ce45ab7c5a46cc1fcc4fd6b37fa71c
11 lines
291 B
Python
11 lines
291 B
Python
from typing import Union, Iterable
|
|
from ... import Tensor
|
|
|
|
_tensor_or_tensors = Union[Tensor, Iterable[Tensor]]
|
|
|
|
|
|
def clip_grad_norm_(parameters: _tensor_or_tensors, max_norm: float, norm_type: float = ...): ...
|
|
|
|
|
|
def clip_grad_value_(parameters: _tensor_or_tensors, clip_value: float): ...
|