[Trivial] Fix Typo
authorDonghak PARK <donghak.park@samsung.com>
Mon, 1 Jul 2024 05:11:49 +0000 (14:11 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 1 Jul 2024 07:55:52 +0000 (16:55 +0900)
Fix Typo at
    modified:   nntrainer/dataset/data_iteration.h
    modified:   nntrainer/dataset/data_producer.h
    modified:   nntrainer/dataset/databuffer.h
    modified:   nntrainer/dataset/dir_data_producers.cpp
    modified:   nntrainer/dataset/random_data_producers.cpp
    modified:   nntrainer/layers/preprocess_l2norm_layer.h
    modified:   nntrainer/layers/split_layer.cpp

**Self evaluation:**
1. Build test:  [X]Passed [ ]Failed [ ]Skipped
2. Run test:  [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Donghak PARK <donghak.park@samsung.com>
nntrainer/app_context.cpp
nntrainer/dataset/data_iteration.h
nntrainer/dataset/data_producer.h
nntrainer/dataset/databuffer.h
nntrainer/dataset/dir_data_producers.cpp
nntrainer/dataset/random_data_producers.cpp
nntrainer/layers/preprocess_l2norm_layer.h
nntrainer/layers/split_layer.cpp

index a66bc667afac12d5d919e1b0f17966442a48d5bd..7c14fd8ae2339ddd9dfd3be191e19a42d949cbdf 100644 (file)
@@ -154,7 +154,7 @@ std::vector<std::string> getPluginPaths() {
    * where you would like to look for the layers, while NNTRAINER_CONF_PATH is a
    * (buildtime hardcoded @a file path) to locate configuration file *.ini file
    */
-  /*** @note for now, NNTRAINER_PATH is a SINGLE PATH rather than serise of path
+  /*** @note for now, NNTRAINER_PATH is a SINGLE PATH rather than series of path
    * like PATH environment variable. this could be improved but for now, it is
    * enough
    */
@@ -211,7 +211,7 @@ const std::string getFullPath(const std::string &path,
 std::mutex factory_mutex;
 
 /**
- * @brief finialize global context
+ * @brief finalize global context
  *
  */
 static void fini_global_context_nntrainer(void) __attribute__((destructor));
@@ -221,7 +221,7 @@ static void fini_global_context_nntrainer(void) {}
 std::once_flag global_app_context_init_flag;
 
 static void add_default_object(AppContext &ac) {
-  /// @note all layers should be added to the app_context to gaurantee that
+  /// @note all layers should be added to the app_context to guarantee that
   /// createLayer/createOptimizer class is created
   using OptType = ml::train::OptimizerType;
   ac.registerFactory(nntrainer::createOptimizer<SGD>, SGD::type, OptType::SGD);
@@ -319,7 +319,7 @@ static void add_default_object(AppContext &ac) {
   ac.registerFactory(nntrainer::createLayer<CentroidKNN>, CentroidKNN::type,
                      LayerType::LAYER_CENTROID_KNN);
 
-  /** proprocess layers */
+  /** preprocess layers */
   ac.registerFactory(nntrainer::createLayer<PreprocessFlipLayer>,
                      PreprocessFlipLayer::type,
                      LayerType::LAYER_PREPROCESS_FLIP);
index efda996e946fe8f0ef1e5cc4526bfab2a319cd4d..93978b1312f83c8f47f77cf67841f03ab19c775f 100644 (file)
@@ -141,7 +141,7 @@ public:
    * @brief Construct a new Sample object
    * @note the batch dimension will be ignored to make a single sample
    *
-   * @param iter iteration obejcts
+   * @param iter iteration objects
    * @param batch nth batch to create the sample
    */
   Sample(const Iteration &iter, unsigned int batch);
index 736654a841f8eb0ece8808da0cfb7247d74498a3..f29e6406a88ab36f4e14f836e36e3d4163077a10 100644 (file)
@@ -109,10 +109,10 @@ public:
   }
 
   /**
-   * @brief this function helps exporting the dataproducer in a predefined
+   * @brief this function helps exporting the data producer in a predefined
    * format, while workarounding issue caused by templated function type eraser
    *
-   * @param     exporter exporter that conatins exporting logic
+   * @param     exporter exporter that contains exporting logic
    * @param     method enum value to identify how it should be exported to
    */
   virtual void exportTo(Exporter &exporter,
@@ -120,7 +120,7 @@ public:
 
   /**
    * @brief denote if given producer is thread safe and can be parallelized.
-   * @note if size() == SIZE_UNDEFIEND, thread safe shall be false
+   * @note if size() == SIZE_UNDEFINED, thread safe shall be false
    *
    * @return bool true if thread safe.
    */
index 0432d5f7e20c02ff7db98f5df85c7bf267aab8bc..fc10da796d57449658c7a8ed133232619a9ce45b 100644 (file)
@@ -139,7 +139,7 @@ public:
    * @brief this function helps exporting the dataset in a predefined format,
    * while workarounding issue caused by templated function type eraser
    *
-   * @param     exporter exporter that conatins exporting logic
+   * @param     exporter exporter that contains exporting logic
    * @param     method enum value to identify how it should be exported to
    */
   void exportTo(Exporter &exporter,
index 8298e448379facbf4ba30c2f62a6abbc83b5a7d4..3c62923ea28b4075751276f36f547f1dbbd9f65a 100644 (file)
@@ -72,9 +72,7 @@ static void readImage(const std::string path, float *input, uint width,
 namespace nntrainer {
 
 DirDataProducer::DirDataProducer() :
-  dir_data_props(new Props()),
-  num_class(0),
-  num_data_total(0) {}
+  dir_data_props(new Props()), num_class(0), num_data_total(0) {}
 
 DirDataProducer::DirDataProducer(const std::string &dir_path) :
   dir_data_props(new Props(props::DirPath(dir_path))),
@@ -140,7 +138,7 @@ DirDataProducer::finalize(const std::vector<TensorDim> &input_dims,
   auto sz = size(input_dims, label_dims);
 
   NNTR_THROW_IF(sz == 0, std::invalid_argument)
-    << "size is zero, dataproducer does not provide anything";
+    << "size is zero, data producer does not provide anything";
 
   return [sz, input_dims, this](unsigned int idx, std::vector<Tensor> &inputs,
                                 std::vector<Tensor> &labels) {
index 73d0462c20fd87dabfdb267b8ccc7bccb48c6c33..a97d5d97be65a7e433fc0986b414f9c21c48c330 100644 (file)
@@ -113,7 +113,7 @@ RandomDataOneHotProducer::finalize(const std::vector<TensorDim> &input_dims,
 
   /// @todo move this to higher order component
   NNTR_THROW_IF(size(input_dims, label_dims) == 0, std::invalid_argument)
-    << "size is zero, dataproducer does not provide anything";
+    << "size is zero, data producer does not provide anything";
 
   /** prepare states for the generator */
   std::vector<std::uniform_int_distribution<unsigned int>> label_chooser_;
index 4319a0cfc7a5c0ad8a3d01bd0bc102bb31b83741..9f28debb704fd2f887b2f2c1d4f9f7dce429fb90 100644 (file)
@@ -29,7 +29,7 @@ class PreprocessL2NormLayer : public Layer {
 public:
   /**
    * @brief Construct a new L2norm Layer object
-   * that normlizes given feature with l2norm
+   * that normalizes given feature with l2norm
    */
   PreprocessL2NormLayer() : Layer() {}
 
index 2b15f07f4214518146f43dce7fbc317f2093f0b2..4e81e678139099a8cbb43054c56fc37d3d88bd6a 100644 (file)
@@ -44,7 +44,7 @@ void SplitLayer::finalize(InitLayerContext &context) {
 
   /**
    * The split is only done along the split_dimension dimension.
-   * (Assumes input data is continous)
+   * (Assumes input data is continuous)
    * For example, consider input dimension [b,c,h,w], split_number = n
    * 1. axis = 1, output_dim = [b,c//n,h,w], num_outputs = n
    * 2. axis = 2, output_dim = [b,c,h//n,w], num_outputs = n
@@ -75,7 +75,7 @@ void SplitLayer::finalize(InitLayerContext &context) {
    * to facilitate easier processing.
    *
    * The helper shape consolidates all the dimensions before the split_dimension
-   * together and all the dimensions after the split_dimension to faciliate
+   * together and all the dimensions after the split_dimension to facilitate
    * easier splitting of the data.
    */
   leading_helper_dim = 1;