From eb61b402da49f2c99b9a886e826f4e52a7f5ae69 Mon Sep 17 00:00:00 2001 From: Omar Shrit Date: Thu, 5 Dec 2024 19:54:14 +0100 Subject: [PATCH] the remaining functions signatures Signed-off-by: Omar Shrit --- src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle.hpp | 2 +- src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle_impl.hpp | 2 +- .../ann/loss_functions/mean_absolute_percentage_error.hpp | 2 +- .../methods/ann/loss_functions/multilabel_softmargin_loss.hpp | 2 +- .../ann/loss_functions/multilabel_softmargin_loss_impl.hpp | 2 +- src/mlpack/methods/ann/loss_functions/triplet_margin_loss.hpp | 2 +- .../methods/ann/loss_functions/triplet_margin_loss_impl.hpp | 2 +- src/mlpack/methods/lmnn/lmnn.hpp | 2 +- src/mlpack/methods/lmnn/lmnn_impl.hpp | 2 +- src/mlpack/methods/nca/nca.hpp | 2 +- src/mlpack/methods/nca/nca_impl.hpp | 2 +- src/mlpack/methods/radical/radical.hpp | 2 +- src/mlpack/methods/radical/radical_impl.hpp | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle.hpp b/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle.hpp index 9e1fbf16f5..451197d81e 100644 --- a/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle.hpp +++ b/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle.hpp @@ -134,7 +134,7 @@ class PixelShuffle * Serialize the layer. */ template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! Locally-stored delta object. diff --git a/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle_impl.hpp b/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle_impl.hpp index af74d804c7..7232a17924 100644 --- a/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle_impl.hpp +++ b/src/mlpack/methods/ann/layer/not_adapted/pixel_shuffle_impl.hpp @@ -119,7 +119,7 @@ template template void PixelShuffle::serialize( Archive& ar, - const unsigned int /* version */) + const uint32_t /* version */) { ar(CEREAL_NVP(delta)); ar(CEREAL_NVP(outputParameter)); diff --git a/src/mlpack/methods/ann/loss_functions/mean_absolute_percentage_error.hpp b/src/mlpack/methods/ann/loss_functions/mean_absolute_percentage_error.hpp index 432f08d167..0182ac0699 100644 --- a/src/mlpack/methods/ann/loss_functions/mean_absolute_percentage_error.hpp +++ b/src/mlpack/methods/ann/loss_functions/mean_absolute_percentage_error.hpp @@ -74,7 +74,7 @@ class MeanAbsolutePercentageErrorType * Serialize the layer. */ template - void serialize(Archive& ar, const unsigned int /* version */) { } + void serialize(Archive& ar, const uint32_t /* version */) { } }; // class MeanAbsolutePercentageErrorType // Default typedef for typical `arma::mat` usage. diff --git a/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss.hpp b/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss.hpp index 6c33e2b73b..ea2e0b64d3 100644 --- a/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss.hpp +++ b/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss.hpp @@ -91,7 +91,7 @@ class MultiLabelSoftMarginLossType * Serialize the layer. */ template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! The boolean value that tells if reduction is sum or mean. diff --git a/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss_impl.hpp b/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss_impl.hpp index 863ada6ec4..d9c0134820 100644 --- a/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss_impl.hpp +++ b/src/mlpack/methods/ann/loss_functions/multilabel_softmargin_loss_impl.hpp @@ -71,7 +71,7 @@ template template void MultiLabelSoftMarginLossType::serialize( Archive& ar, - const unsigned int /* version */) + const uint32_t /* version */) { ar(CEREAL_NVP(classWeights)); ar(CEREAL_NVP(reduction)); diff --git a/src/mlpack/methods/ann/loss_functions/triplet_margin_loss.hpp b/src/mlpack/methods/ann/loss_functions/triplet_margin_loss.hpp index b6fa6fa3cc..f350735e3f 100644 --- a/src/mlpack/methods/ann/loss_functions/triplet_margin_loss.hpp +++ b/src/mlpack/methods/ann/loss_functions/triplet_margin_loss.hpp @@ -81,7 +81,7 @@ class TripletMarginLossType * Serialize the layer. */ template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! The margin value used in calculating Triplet Margin Loss. diff --git a/src/mlpack/methods/ann/loss_functions/triplet_margin_loss_impl.hpp b/src/mlpack/methods/ann/loss_functions/triplet_margin_loss_impl.hpp index c138e9fa2d..bfbb2cf19f 100644 --- a/src/mlpack/methods/ann/loss_functions/triplet_margin_loss_impl.hpp +++ b/src/mlpack/methods/ann/loss_functions/triplet_margin_loss_impl.hpp @@ -55,7 +55,7 @@ template template void TripletMarginLossType::serialize( Archive& ar, - const unsigned int /* version */) + const uint32_t /* version */) { ar(CEREAL_NVP(margin)); } diff --git a/src/mlpack/methods/lmnn/lmnn.hpp b/src/mlpack/methods/lmnn/lmnn.hpp index e2ba1edebc..f9ac4b063b 100644 --- a/src/mlpack/methods/lmnn/lmnn.hpp +++ b/src/mlpack/methods/lmnn/lmnn.hpp @@ -205,7 +205,7 @@ class LMNN // Serialize the LMNN object. template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! Dataset pointer (will be removed in mlpack 5.0.0). diff --git a/src/mlpack/methods/lmnn/lmnn_impl.hpp b/src/mlpack/methods/lmnn/lmnn_impl.hpp index 5dfc87bb78..cf95c1d2a5 100644 --- a/src/mlpack/methods/lmnn/lmnn_impl.hpp +++ b/src/mlpack/methods/lmnn/lmnn_impl.hpp @@ -115,7 +115,7 @@ void LMNN::LearnDistance( template template void LMNN::serialize( - Archive& ar, const unsigned int /* version */) + Archive& ar, const uint32_t /* version */) { ar(CEREAL_NVP(k)); ar(CEREAL_NVP(regularization)); diff --git a/src/mlpack/methods/nca/nca.hpp b/src/mlpack/methods/nca/nca.hpp index 189e5236d5..5ff7e87b72 100644 --- a/src/mlpack/methods/nca/nca.hpp +++ b/src/mlpack/methods/nca/nca.hpp @@ -167,7 +167,7 @@ class NCA DistanceType& Distance() { return distance; } template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! Dataset pointer (will be removed in mlpack 5.0.0). diff --git a/src/mlpack/methods/nca/nca_impl.hpp b/src/mlpack/methods/nca/nca_impl.hpp index 6b3f9f9103..ab445121af 100644 --- a/src/mlpack/methods/nca/nca_impl.hpp +++ b/src/mlpack/methods/nca/nca_impl.hpp @@ -98,7 +98,7 @@ void NCA::LearnDistance( template template void NCA::serialize( - Archive& ar, const unsigned int /* version */) + Archive& ar, const uint32_t /* version */) { ar(CEREAL_NVP(distance)); } diff --git a/src/mlpack/methods/radical/radical.hpp b/src/mlpack/methods/radical/radical.hpp index d2fab48826..ef3f4f464d 100644 --- a/src/mlpack/methods/radical/radical.hpp +++ b/src/mlpack/methods/radical/radical.hpp @@ -148,7 +148,7 @@ class Radical // Serialize the Radical object. template - void serialize(Archive& ar, const unsigned int /* version */); + void serialize(Archive& ar, const uint32_t /* version */); private: //! Standard deviation of the Gaussian noise added to the replicates of diff --git a/src/mlpack/methods/radical/radical_impl.hpp b/src/mlpack/methods/radical/radical_impl.hpp index 8327a85d14..511e180cbd 100644 --- a/src/mlpack/methods/radical/radical_impl.hpp +++ b/src/mlpack/methods/radical/radical_impl.hpp @@ -217,7 +217,7 @@ inline void Radical::Apply(const MatType& matXT, } template -void Radical::serialize(Archive& ar, const unsigned int /* version */) +void Radical::serialize(Archive& ar, const uint32_t /* version */) { ar(CEREAL_NVP(noiseStdDev)); ar(CEREAL_NVP(replicates));