DiSMEC++
|
An initialization strategy that sets the weight vector to a given constant. More...
Public Member Functions | |
ConstantInitializationStrategy (DenseRealVector vec) | |
std::unique_ptr< WeightsInitializer > | make_initializer (const std::shared_ptr< const GenericFeatureMatrix > &features) const override |
Creats a new, thread local WeightsInitializer . More... | |
![]() | |
virtual | ~WeightInitializationStrategy ()=default |
Private Attributes | |
parallel::NUMAReplicator< DenseRealVector > | m_InitVector |
An initialization strategy that sets the weight vector to a given constant.
We create NUMA-local copies of the given vector, and provide pointers to these to the resulting ConstantInitializer
objects.
Definition at line 34 of file constant.cpp.
|
explicit |
Definition at line 47 of file constant.cpp.
|
overridevirtual |
Creats a new, thread local WeightsInitializer
.
This function will be called from the thread in which the returned WeightsInitializer
will be used. It gets passed in a numa-local copy of the feature matrix.
features | Read-only reference to the numa-local feature matrix. |
WeightsInitializer
. Implements dismec::init::WeightInitializationStrategy.
Definition at line 51 of file constant.cpp.
References dismec::parallel::NUMAReplicator< T >::get_local(), and m_InitVector.
|
private |
Definition at line 42 of file constant.cpp.
Referenced by make_initializer().