Browse Source

!4771 Fixes Comment style

Merge pull request !4771 from EricZ/md_tensor_from_mem
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
4fe2892b89
1 changed files with 10 additions and 11 deletions
  1. +10
    -11
      mindspore/ccsrc/minddata/dataset/include/de_tensor.h

+ 10
- 11
mindspore/ccsrc/minddata/dataset/include/de_tensor.h View File

@@ -27,22 +27,21 @@ namespace tensor {
class DETensor : public MSTensor { class DETensor : public MSTensor {
public: public:
/// \brief Create a MSTensor pointer. /// \brief Create a MSTensor pointer.
/// \param[data_type] DataTypeId of tensor to be created.
/// \param[shape] Shape of tensor to be created.
/// \return - MSTensor pointer.
/// \param[in] data_type DataTypeId of tensor to be created
/// \param[in] shape Shape of tensor to be created
/// \return MSTensor pointer
static MSTensor *CreateTensor(TypeId data_type, const std::vector<int> &shape); static MSTensor *CreateTensor(TypeId data_type, const std::vector<int> &shape);


/// \brief Create a MSTensor pointer. /// \brief Create a MSTensor pointer.
/// \param[path] Path file to be read.
/// \return - MSTensor pointer.
/// \param[in] path Path to file to read
/// \return MSTensor pointer
static MSTensor *CreateTensor(const std::string &path); static MSTensor *CreateTensor(const std::string &path);


/// \brief Create a MSTensor pointer. /// \brief Create a MSTensor pointer.
/// \note This function returns null_ptr if tensor creation fails.
/// \param[data_type] DataTypeId of tensor to be created.
/// \param[shape] Shape of tensor to be created.
/// \param[data] Data pointer.
/// \return - MSTensor pointer.
/// \param[in] data_type Data TypeId of tensor to be created
/// \param[in] shape Shape of tensor to be created
/// \param[in] data Data pointer
/// \return MSTensor pointer
static MSTensor *CreateFromMemory(TypeId data_type, const std::vector<int> &shape, void *data); static MSTensor *CreateFromMemory(TypeId data_type, const std::vector<int> &shape, void *data);


DETensor(TypeId data_type, const std::vector<int> &shape); DETensor(TypeId data_type, const std::vector<int> &shape);
@@ -52,7 +51,7 @@ class DETensor : public MSTensor {
~DETensor() = default; ~DETensor() = default;


/// \brief Create a duplicate instance, convert the DETensor to the LiteTensor. /// \brief Create a duplicate instance, convert the DETensor to the LiteTensor.
/// \return - MSTensor pointer.
/// \return MSTensor pointer
MSTensor *ConvertToLiteTensor(); MSTensor *ConvertToLiteTensor();


std::shared_ptr<dataset::Tensor> tensor() const; std::shared_ptr<dataset::Tensor> tensor() const;


Loading…
Cancel
Save