Sha256: af77a4c9e5e16dab3c15dce6a9dd274e36f3b2a5f321d7590a812e1abdf57cd3
Contents?: true
Size: 504 Bytes
Versions: 9
Compression:
Stored size: 504 Bytes
Contents
#include <torch/torch.h> #include <rice/rice.hpp> #include "utils.h" void init_random(Rice::Module& m) { Rice::define_module_under(m, "Random") .define_singleton_function( "initial_seed", []() { return at::detail::getDefaultCPUGenerator().current_seed(); }) .define_singleton_function( "seed", []() { // TODO set for CUDA when available auto generator = at::detail::getDefaultCPUGenerator(); return generator.seed(); }); }
Version data entries
9 entries across 9 versions & 1 rubygems