This commit is contained in:
wilfChen 2021-10-12 09:41:40 +08:00
parent 58a2a02400
commit 54761ecccc
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;