You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2021/03/14 21:14:30 UTC

[incubator-mxnet] branch master updated: fix bugs for encoding params (#20007)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new d0a5daa  fix bugs for encoding params (#20007)
d0a5daa is described below

commit d0a5daa66066158bf5ee3dbae795eba3e833df7d
Author: Shuo Ouyang <sh...@foxmail.com>
AuthorDate: Mon Mar 15 05:12:49 2021 +0800

    fix bugs for encoding params (#20007)
    
    Co-authored-by: shuo-ouyang <14...@qq.com>
---
 src/kvstore/gradient_compression.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kvstore/gradient_compression.cc b/src/kvstore/gradient_compression.cc
index dbfc495..d59035a 100644
--- a/src/kvstore/gradient_compression.cc
+++ b/src/kvstore/gradient_compression.cc
@@ -72,7 +72,7 @@ void GradientCompression::SetTwoBitCompression(const float threshold) {
 std::string GradientCompression::EncodeParams() {
   using namespace std;  // to reduce length of next line
   string rval = get_type_str();
-  if (type_ == CompressionType::kTwoBit) {
+  if (type_ != CompressionType::kNone) {
     rval += "," + to_string(threshold_);
   }
   return rval;