Program Listing for File constant_of_shape.h
↰ Return to documentation for file (include/converter/include/ops/constant_of_shape.h
)
#ifndef MINDSPORE_CORE_OPS_CONSTANT_OF_SHAPE_H_
#define MINDSPORE_CORE_OPS_CONSTANT_OF_SHAPE_H_
#include <memory>
#include <vector>
#include "mindapi/base/types.h"
#include "ops/base_operator.h"
namespace mindspore {
namespace ops {
constexpr auto kNameConstantOfShape = "ConstantOfShape";
class MIND_API ConstantOfShape : public BaseOperator {
public:
MIND_API_BASE_MEMBER(ConstantOfShape);
ConstantOfShape() : BaseOperator(kNameConstantOfShape) { InitIOName({"shape"}, {"output"}); }
void Init(int64_t data_type, const std::vector<float> &value);
void set_data_type(int64_t data_type);
void set_value(const std::vector<float> &value);
int64_t get_data_type() const;
std::vector<float> get_value() const;
};
MIND_API abstract::AbstractBasePtr ConstantOfShapeInfer(const abstract::AnalysisEnginePtr &,
const PrimitivePtr &primitive,
const std::vector<abstract::AbstractBasePtr> &input_args);
} // namespace ops
} // namespace mindspore
#endif // MINDSPORE_CORE_OPS_CONSTANT_OF_SHAPE_H_