Program Listing for File fake_quant_with_min_max_vars_per_channel.h
↰ Return to documentation for file (include/converter/include/ops/fake_quant_with_min_max_vars_per_channel.h
)
#ifndef MINDSPORE_CORE_OPS_FAKE_QUANT_WITH_MIN_MAX_VARS_PER_CHANNEL_H_
#define MINDSPORE_CORE_OPS_FAKE_QUANT_WITH_MIN_MAX_VARS_PER_CHANNEL_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameFakeQuantWithMinMaxVarsPerChannel = "FakeQuantWithMinMaxVarsPerChannel";
class MIND_API FakeQuantWithMinMaxVarsPerChannel : public BaseOperator {
public:
MIND_API_BASE_MEMBER(FakeQuantWithMinMaxVarsPerChannel);
FakeQuantWithMinMaxVarsPerChannel() : BaseOperator(kNameFakeQuantWithMinMaxVarsPerChannel) {}
void Init(const int64_t num_bits = 8, const bool narrow_range = false);
void set_num_bits(const int64_t num_bits);
void set_narrow_range(const bool narrow_range);
int64_t get_num_bits() const;
bool get_narrow_range() const;
};
MIND_API abstract::AbstractBasePtr FakeQuantWithMinMaxVarsPerChannelInfer(
const abstract::AnalysisEnginePtr &, const PrimitivePtr &primitive,
const std::vector<abstract::AbstractBasePtr> &input_args);
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_FAKE_QUANT_WITH_MIN_MAX_VARS_PER_CHANNEL_H_