Summary:
https://pytorch.org/docs/master/tensors.html#torch.Tensor.bernoulli_
https://pytorch.org/docs/master/torch.html#torch.addmm
https://pytorch.org/docs/master/distributed_deprecated.html#torch.distributed.deprecated.reduce_multigpu
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16033
Differential Revision:
D13671202
Pulled By: soumith
fbshipit-source-id:
276e10e610affe205376573e7f0f9894695d218d
The :math:`\text{i}^{th}` element of :attr:`self` tensor will be set to a
value sampled from :math:`\text{Bernoulli}(\texttt{p\_tensor[i]})`.
- :attr:`self` can have integral ``dtype``, but :attr`p_tensor` must have
+ :attr:`self` can have integral ``dtype``, but :attr:`p_tensor` must have
floating point ``dtype``.
See also :meth:`~Tensor.bernoulli` and :func:`torch.bernoulli`
and :attr:`out` will be a :math:`(n \times p)` tensor.
:attr:`alpha` and :attr:`beta` are scaling factors on matrix-vector product between
-:attr:`mat1` and :attr`mat2` and the added matrix :attr:`mat` respectively.
+:attr:`mat1` and :attr:`mat2` and the added matrix :attr:`mat` respectively.
.. math::
\text{out} = \beta\ \text{mat} + \alpha\ (\text{mat1}_i \mathbin{@} \text{mat2}_i)
The returned :attr:`out` tensor only has values 0 or 1 and is of the same
shape as :attr:`input`.
-:attr:`out` can have integral ``dtype``, but :attr`input` must have floating
+:attr:`out` can have integral ``dtype``, but :attr:`input` must have floating
point ``dtype``.
Args:
def reduce_multigpu(tensor_list, dst, op=reduce_op.SUM, group=group.WORLD):
r"""Reduces the tensor data on multiple GPUs across all machines. Each tensor
- in :attr`tensor_list` should reside on a separate GPU.
+ in :attr:`tensor_list` should reside on a separate GPU.
Only the GPU of ``tensor_list[0]`` on the process with rank :attr:`dst` is
going to receive the final result.
r"""Copies parameters and buffers from :attr:`state_dict` into only
this module, but not its descendants. This is called on every submodule
in :meth:`~torch.nn.Module.load_state_dict`. Metadata saved for this
- module in input :attr:`state_dict` is provided as :attr`local_metadata`.
- For state dicts without metadata, :attr`local_metadata` is empty.
+ module in input :attr:`state_dict` is provided as :attr:`local_metadata`.
+ For state dicts without metadata, :attr:`local_metadata` is empty.
Subclasses can achieve class-specific backward compatible loading using
the version number at `local_metadata.get("version", None)`.