Merge pull request !24708 from chenweifeng/code-clean
This commit is contained in:
i-robot 2021-10-12 14:17:18 +00:00 committed by Gitee
commit 3609a5725b
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ constexpr size_t INPUT_NUM = 7;
template <typename T, typename S>
class FusedWeightDecayScaleMomentumGpuKernel : public GpuKernel {
public:
FusedWeightDecayScaleMomentumGpuKernel() : element_num_(1) {}
FusedWeightDecayScaleMomentumGpuKernel() : element_num_(1), is_null_input_(false) {}
~FusedWeightDecayScaleMomentumGpuKernel() override = default;
const std::vector<size_t> &GetInputSizeList() const override { return input_size_list_; }
const std::vector<size_t> &GetOutputSizeList() const override { return output_size_list_; }

View File

@ -35,7 +35,7 @@ class LayerInput {
bool IsTensor() const { return type_ == InputType::kTensor; }
bool IsWeight() const { return type_ == InputType::kWeight; }
nvinfer1::Weights *weight() {
const nvinfer1::Weights *weight() {
if (!IsWeight()) {
MS_LOG(WARNING) << "weight not initialized.";
return nullptr;