forked from mindspore-Ecosystem/mindspore
!24708 code clean
Merge pull request !24708 from chenweifeng/code-clean
This commit is contained in:
commit
3609a5725b
|
@ -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_; }
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue