Use ApplyMomentumD instead of ApplyMomentum

This commit is contained in:
simson 2020-05-07 19:04:04 +08:00
parent f602970990
commit 89b8ea0aae
4 changed files with 9 additions and 9 deletions

@ -1 +1 @@
Subproject commit 63cb729373ae8b1b14bc14176c14dac6d18d0e4d
Subproject commit 3c79066765d39529a1e91518bb7f2e2780ad024c

View File

@ -203,7 +203,7 @@ std::unordered_map<std::string, OpAdapterDescPtr> &DfGraphConvertor::get_adpt_ma
{string(kNameIOU), ADPT_DESC(Iou)},
{string(kNameGreaterEqual), ADPT_DESC(GreaterEqual)},
{string(kNameSlice), ADPT_DESC(SliceD)},
{string(kNameApplyMomentum), ADPT_DESC(ApplyMomentum)},
{string(kNameApplyMomentum), ADPT_DESC(ApplyMomentumD)},
{string(kNameMaxPool), ADPT_DESC(MaxPool)},
{string(kNameAvgPool), ADPT_DESC(AvgPool)},
{string(kNameMaxPoolWithArgmax), ADPT_DESC(MaxPoolWithArgmax)},

View File

@ -127,12 +127,12 @@ INPUT_MAP(Constant) = EMPTY_INPUT_MAP;
ATTR_MAP(Constant) = {{"value", ATTR_DESC(value, AnyTraits<AnyValue>())}};
OUTPUT_MAP(Constant) = {{0, OUTPUT_DESC(y)}};
// ApplyMomentum
INPUT_MAP(ApplyMomentum) = {
// ApplyMomentumD
INPUT_MAP(ApplyMomentumD) = {
{1, INPUT_DESC(var)}, {2, INPUT_DESC(accum)}, {3, INPUT_DESC(lr)}, {4, INPUT_DESC(grad)}, {5, INPUT_DESC(momentum)}};
ATTR_MAP(ApplyMomentum) = {{"use_nesterov", ATTR_DESC(use_nesterov, AnyTraits<bool>())},
{"use_locking", ATTR_DESC(use_locking, AnyTraits<bool>())}};
OUTPUT_MAP(ApplyMomentum) = {{0, OUTPUT_DESC(var)}};
ATTR_MAP(ApplyMomentumD) = {{"use_nesterov", ATTR_DESC(use_nesterov, AnyTraits<bool>())},
{"use_locking", ATTR_DESC(use_locking, AnyTraits<bool>())}};
OUTPUT_MAP(ApplyMomentumD) = {{0, OUTPUT_DESC(var)}, {1, OUTPUT_DESC(accum)}};
// ScalarSummary
INPUT_MAP(Summary) = {{2, INPUT_DESC(x)}};

View File

@ -313,8 +313,8 @@ DECLARE_OP_ADAPTER(Assign)
DECLARE_OP_USE_OUTPUT(Assign)
DECLARE_OP_ADAPTER(Constant)
DECLARE_OP_USE_OUTPUT(Constant)
DECLARE_OP_ADAPTER(ApplyMomentum)
DECLARE_OP_USE_OUTPUT(ApplyMomentum)
DECLARE_OP_ADAPTER(ApplyMomentumD)
DECLARE_OP_USE_OUTPUT(ApplyMomentumD)
// ** Summary Operations **
DECLARE_OP_ADAPTER(Summary)