Poplar and PopLibs
|
Functions for random number generation and applying random functions to tensors. More...
#include "poputil/exceptions.hpp"
#include <array>
#include <cmath>
#include <cstdint>
#include <poplar/Graph.hpp>
#include <poplar/Program.hpp>
#include <string>
#include <utility>
Go to the source code of this file.
Namespaces | |
namespace | poprand |
Pseudo-random number generator (PRNG) functions. | |
Functions | |
poplar::Tensor | poprand::dropout (poplar::Graph &graph, const poplar::Tensor *seed, const uint32_t seedModifier, const poplar::Tensor &input, const poplar::Tensor &reference, double keepProbability, double scale, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Apply dropout to a tensor. More... | |
poplar::Tensor | poprand::dropout (poplar::Graph &graph, const poplar::Tensor *seed, const uint32_t seedModifier, const poplar::Tensor &input, const poplar::Tensor &reference, double keepProbability, double scale, bool outputClonesRef, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Apply dropout to a tensor. More... | |
poplar::Tensor | poprand::shapedDropout (poplar::Graph &graph, const poplar::Tensor *seed, const uint32_t seedModifier, const poplar::Tensor &input, const poplar::Tensor &reference, double keepProbability, double scale, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Apply shaped dropout to a tensor. More... | |
poplar::Tensor | poprand::uniform (poplar::Graph &graph, const poplar::Tensor *seed, uint32_t seedModifier, const poplar::Tensor &reference, const poplar::Type &outType, double minVal, double maxVal, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Uniform distribution in a given interval with maxVal > minVal . More... | |
poplar::Tensor | poprand::logUniform (poplar::Graph &graph, const poplar::Tensor *seed, uint32_t seedModifier, const poplar::Tensor &reference, const poplar::Type &outType, double minVal, double maxVal, poplar::program::Sequence &prog, double base=M_E, const poplar::DebugContext &debugContext={}) |
Log-uniform distribution over a closed interval [minVal , maxVal ]. More... | |
poplar::Tensor | poprand::bernoulli (poplar::Graph &graph, const poplar::Tensor *seed, uint32_t seedModifier, const poplar::Tensor &reference, const poplar::Type &outType, double prob, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Bernoulli distribution which has the value 1 with the specified probability. More... | |
poplar::Tensor | poprand::normal (poplar::Graph &graph, const poplar::Tensor *seed, uint32_t seedModifier, const poplar::Tensor &reference, const poplar::Type &outType, double mean, double stdDev, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Normal distribution with given mean and standard deviation. More... | |
poplar::Tensor | poprand::truncatedNormal (poplar::Graph &graph, const poplar::Tensor *seed, uint32_t seedModifier, const poplar::Tensor &reference, const poplar::Type &outType, double mean, double stdDev, double alpha, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Truncated normal distribution. More... | |
void | poprand::setSeed (poplar::Graph &graph, const poplar::Tensor &masterSeed, uint32_t seedModifier, poplar::program::Sequence &prog, const poplar::DebugContext &debugContext={}) |
Sets the random number generator seed on all tiles. More... | |
Functions for random number generation and applying random functions to tensors.