Program Listing for File ckpt_saver.h
↰ Return to documentation for file (include/ckpt_saver.h
)
#ifndef MINDSPORE_INCLUDE_API_CALLBACK_CKPT_SAVER_H
#define MINDSPORE_INCLUDE_API_CALLBACK_CKPT_SAVER_H
#include <cstddef>
#include <string>
#include <vector>
#include <memory>
#include "include/api/callback/callback.h"
#include "include/api/dual_abi_helper.h"
namespace mindspore {
class CkptSaver: public TrainCallBack {
public:
inline CkptSaver(int save_every_n, const std::string &filename_prefix);
virtual ~CkptSaver();
private:
CkptSaver(int save_every_n, const std::vector<char> &filename_prefix);
};
CkptSaver::CkptSaver(int save_every_n, const std::string &filename_prefix)
: CkptSaver(save_every_n, StringToChar(filename_prefix)) {}
} // namespace mindspore
#endif // MINDSPORE_INCLUDE_API_CALLBACK_CKPT_SAVER_H