self Class — pytorch Architecture
Architecture documentation for the self class in Distributions.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/Distributions.cpp lines 147–156
template<typename RNG>
struct BernoulliStub {
void operator()(Tensor& self, const Tensor& p_, std::optional<Generator> gen) {
bernoulli_tensor_stub(self.device().type(), self, p_, gen);
}
void operator()(Tensor& self, double p, std::optional<Generator> gen) {
bernoulli_scalar_stub(self.device().type(), self, p, gen);
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free