提交 7a2d59d1 编写于 作者: duduscript's avatar duduscript 提交者: Will Zhang

Fix bug in ModelUpdateKernel (#551)

* add l1 l2 regularization

* fix some problem

* Fix bug

* fix op API

* Fix a bug in op

* add l1l2

* remove regularization_diff_blob

* remove sign in kernel_util

* fix naming problem and add l1l2 function

* simplify code

* remove else

* update modelupdate API

* Fix bug

* ~

* fix bug

* add basic_rnn_op

* remove useless code and add virtual for deconstruct

* remove useless code


Former-commit-id: e06ff99f
上级 38742944
......@@ -50,12 +50,6 @@ class MdUpdateKernelUtil<DeviceType::kCPU, T> final {
}
};
#define INSTANTIATE_KERNEL_UTIL(data_type_pair) \
template class MdUpdateKernelUtil<DeviceType::kCPU, \
OF_PP_PAIR_FIRST(data_type_pair)>;
OF_PP_SEQ_PRODUCT_FOR_EACH_TUPLE(INSTANTIATE_KERNEL_UTIL,
FLOATING_DATA_TYPE_SEQ)
#define INSTANTIATE_KERNEL(device_type, data_type_pair) \
template class MdUpdateKernel<device_type, OF_PP_PAIR_FIRST(data_type_pair)>;
OF_PP_SEQ_PRODUCT_FOR_EACH_TUPLE(INSTANTIATE_KERNEL, DEVICE_TYPE_SEQ,
......
......@@ -9,7 +9,7 @@ template<DeviceType device_type, typename T>
class MdUpdateKernel : public KernelIf<device_type> {
public:
OF_DISALLOW_COPY_AND_MOVE(MdUpdateKernel);
~MdUpdateKernel() = default;
virtual ~MdUpdateKernel() = default;
void Forward(
const KernelCtx& ctx,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册