#include <vector>
#include <random>
#include "utilities_internal.h"
#include "memory/memorymanager.h"
Go to the source code of this file.
- Author
- Daniel Nichols
- Version
- 0.1
- Date
- 2019-02-12
- Copyright
- Copyright (c) 2019
◆ fill_constant()
template<typename T >
void magmadnn::internal::fill_constant |
( |
MemoryManager< T > & |
m, |
|
|
const std::vector< T > & |
params |
|
) |
| |
Fills the memorymanager with the same constant value.
- Template Parameters
-
- Parameters
-
m | memorymanager to be filled. |
params | |
◆ fill_diagonal()
template<typename T >
void magmadnn::internal::fill_diagonal |
( |
MemoryManager< T > & |
m, |
|
|
const std::vector< T > & |
params |
|
) |
| |
Fills the memorymanager's diagonal elements. Assumes the memory manager is square. If one value is given for params, then it is applied to all diagonals. Otherwise the list is applied to fill the diagonals.
- Template Parameters
-
- Parameters
-
◆ fill_glorot()
template<typename T >
void magmadnn::internal::fill_glorot |
( |
MemoryManager< T > & |
m, |
|
|
const std::vector< T > & |
params |
|
) |
| |
Fills the memorymanager with a modified normal distribution (per Glorot et. al.).
- Template Parameters
-
- Parameters
-
m | memorymanager to be filled. |
params | |
◆ fill_mask()
template<typename T >
void magmadnn::internal::fill_mask |
( |
MemoryManager< T > & |
m, |
|
|
const std::vector< T > & |
params |
|
) |
| |
Fills the memorymanager zeroes and ones using a Bernoulli distribution.
- Template Parameters
-
- Parameters
-
m | memorymanager to be filled. |
params | |
◆ fill_uniform()
template<typename T >
void magmadnn::internal::fill_uniform |
( |
MemoryManager< T > & |
m, |
|
|
const std::vector< T > & |
params |
|
) |
| |
Fills the memory manager with a uniform distribution.
- Template Parameters
-
- Parameters
-
m | memorymanager that will be filled |
params | |