Update¶
-
namespace
paddle
¶ -
class
ParameterUpdater
¶ Subclassed by paddle::ParameterUpdaterComposite, paddle::RemoteParameterUpdater, paddle::SgdLocalUpdater, paddle::SgdThreadUpdater, paddle::SparseRemoteParameterUpdater
Public Functions
-
ParameterUpdater
()¶
-
virtual
~ParameterUpdater
()¶
-
void
addParameterType
(ParameterType type)¶
-
void
init
(std::vector<ParameterPtr> ¶meters)¶
-
virtual void
startPass
()¶
-
virtual bool
finishPass
(real cost = 0)¶
-
virtual PassType
startBatch
(int64_t batchSize)¶
-
virtual void
finishBatch
(real cost)¶
-
virtual void
getParametersRemote
(bool fullSize = false, bool apply = false)¶
-
virtual void
loadParametersRemote
(const std::string &dirName)¶
-
virtual void
saveParametersRemote
(const std::string &dirName)¶
-
virtual void
randParametersRemote
()¶
-
virtual void
catchUpWith
()¶
-
virtual void
apply
()¶
-
virtual void
restore
()¶
-
const std::vector<ParameterType> &
getParameterTypes
() const¶
-
virtual void
setForwardbackwardTime
(uint64_t delta)¶
Protected Attributes
-
std::vector<ParameterType>
parameterTypes_
¶
-
std::vector<ParameterPtr>
parameters_
¶
-
std::map<size_t, size_t>
nonStaticParaIDMap_
¶
-
-
class
ParameterUpdaterComposite
¶ Inherits from paddle::ParameterUpdater
Subclassed by paddle::SparseRemoteParameterUpdaterComposite
Public Functions
-
ParameterUpdaterComposite
()¶
-
virtual
~ParameterUpdaterComposite
()¶
-
virtual void
init
(std::vector<ParameterPtr> ¶meters) = 0¶
-
virtual void
startPass
()¶
-
virtual bool
finishPass
(real cost = 0)¶
-
virtual PassType
startBatch
(int64_t batchSize)¶
-
virtual void
finishBatch
(real cost)¶
-
virtual void
getParametersRemote
(bool fullSize, bool apply)¶
-
virtual void
loadParametersRemote
(const std::string &dirName)¶
-
virtual void
saveParametersRemote
(const std::string &dirName)¶
-
virtual void
randParametersRemote
()¶
-
virtual void
catchUpWith
()¶
-
virtual void
setForwardbackwardTime
(uint64_t delta)¶
-
virtual void
apply
()¶
-
virtual void
restore
()¶
Protected Attributes
-
std::vector<std::unique_ptr<ParameterUpdater>>
updaters_
¶
-
std::unique_ptr<SyncThreadPool>
syncThreadPool_
¶
-
-
class
-
namespace
paddle
¶ Variables
-
class paddle::IParameterUpdaterHook
__attribute__
¶
-
class
IParameterUpdaterHook
¶ - #include <ParameterUpdaterHook.h>
The parameter updater hook interface.
The Parameter Updater hooks is a group of methods invoke before ParameterUpdater::updateImpl. It can modify gradient/momentum/etc before parameter optimization.
Subclassed by paddle::StaticPruningHook
Public Functions
-
~IParameterUpdaterHook
()¶
Public Static Functions
-
std::shared_ptr<IParameterUpdaterHook>
create
(const ParameterConfig ¶mConfig, int idx)¶ Create A ParameterUpdaterHook.
The same parameter shared the same hooks. So it returns shared_ptr.
- Parameters
param_config
: The parameter config.idx
: The element index of param_config.updater_hooks() array.
Protected Functions
-
IParameterUpdaterHook
()¶ Ctor.
-
-
class paddle::IParameterUpdaterHook