forked from mindspore-Ecosystem/mindspore
commit
3b625ac9ae
|
@ -210,7 +210,6 @@ class TensorSlice : public MetaFuncGraph {
|
|||
FuncGraphPtr ExpandADim(const FuncGraphPtr &ret_graph, const AnfNodePtr &tensor_node) const;
|
||||
};
|
||||
using TensorSlicePtr = std::shared_ptr<TensorSlice>;
|
||||
|
||||
} // namespace prim
|
||||
} // namespace mindspore
|
||||
|
||||
|
|
|
@ -89,6 +89,5 @@ REGISTER_PYBIND_DEFINE(UnpackCall_, ([](const py::module *m) {
|
|||
(void)py::class_<UnpackCall, MetaFuncGraph, std::shared_ptr<UnpackCall>>(*m, "UnpackCall_")
|
||||
.def(py::init<std::string &>());
|
||||
}));
|
||||
|
||||
} // namespace prim
|
||||
} // namespace mindspore
|
||||
|
|
|
@ -252,7 +252,6 @@ class DfGraphConvertor {
|
|||
bool training_ = false;
|
||||
bool distribute_ = false;
|
||||
};
|
||||
|
||||
} // namespace transform
|
||||
} // namespace mindspore
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ bool AnyIsLiteral(const Any &any) {
|
|||
static const std::type_index typeid_float = std::type_index(typeid(float));
|
||||
static const std::type_index typeid_bool = std::type_index(typeid(bool));
|
||||
|
||||
std::type_index typeid_any = std::type_index(any.type());
|
||||
auto typeid_any = std::type_index(any.type());
|
||||
return typeid_int == typeid_any || typeid_float == typeid_any || typeid_bool == typeid_any;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace callbacks {
|
||||
|
||||
const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback";
|
||||
const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op";
|
||||
const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op";
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace callbacks {
|
||||
|
||||
const char PYTHON_MOD_CALLBACK_MODULE[] = "mindspore.train.callback";
|
||||
const char PYTHON_FUN_PROCESS_CHECKPOINT[] = "_checkpoint_cb_for_save_op";
|
||||
const char PYTHON_FUN_PROCESS_SUMMARY[] = "_summary_cb_for_save_op";
|
||||
|
|
|
@ -26,12 +26,10 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace callbacks {
|
||||
|
||||
using mindspore::tensor::TensorPtr;
|
||||
|
||||
uint32_t CheckpointSaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &);
|
||||
uint32_t SummarySaveCallback(uint32_t, const std::map<std::string, ge::Tensor> &);
|
||||
|
||||
} // namespace callbacks
|
||||
} // namespace mindspore
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ py::object VectorRefToPyData(const VectorRef &value_list) {
|
|||
py::object ret;
|
||||
MS_LOG(DEBUG) << "vector_ref";
|
||||
size_t value_size = value_list.size();
|
||||
py::tuple ref_tuple = py::tuple(value_size);
|
||||
auto ref_tuple = py::tuple(value_size);
|
||||
for (size_t i = 0; i < value_size; i++) {
|
||||
ref_tuple[i] = BaseRefToPyData(value_list[i]);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ static std::string GetTime() {
|
|||
now_time.tm_hour, now_time.tm_min, now_time.tm_sec);
|
||||
#else
|
||||
struct timeval cur_time;
|
||||
(void)gettimeofday(&cur_time, NULL);
|
||||
(void)gettimeofday(&cur_time, nullptr);
|
||||
|
||||
struct tm now;
|
||||
(void)localtime_r(&cur_time.tv_sec, &now);
|
||||
|
|
Loading…
Reference in New Issue