Skip to content

Conversation

@reyoung
Copy link
Collaborator

@reyoung reyoung commented Dec 15, 2016

@emailweixu I just add a unit test to coverage here, and add more comments to here.

@wangkuiyi wangkuiyi changed the title Add unittest to coverage SgdThreadUpdater's enableBufType Add unittest to cover SgdThreadUpdater's enableBufType Dec 16, 2016
@@ -0,0 +1,23 @@
from paddle.trainer_config_helpers import *

settings(batch_size=128, learning_method=AdaGradOptimizer(), learning_rate=1e-4)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use average in order to test enableBufType

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in method

void trainerOnePassTest(const string& configFile,
                         bool useGpu,
                         bool parallel,
                         int trainerCount = 1,
                         double averageWindow = 0.0f,
                         bool doAverageInCpu = false) ;

So i invoke trainerOnePassTest as

trainerOnePassTest(configFileSimpleSparse, false, false, 1, 0.5, true);

Just set AverageWindow=0.5 in cpp side.

@emailweixu emailweixu merged commit 8a42a54 into PaddlePaddle:develop Dec 20, 2016
@reyoung reyoung deleted the feature/add_unittest branch December 20, 2016 14:22
wangxicoding pushed a commit to wangxicoding/Paddle that referenced this pull request Dec 9, 2021
* fix unified transformer dtype problem

* fix win dtype bug

* Fix plato-2 and plato-mini dtype bug

* Fix plato-2 tokenization

* Refine some doc

* Add general k support for topk sampling

* fix seed

* minor fix

* Fix unitransformer readme

* topk kernel optimization

* add unimo model and fix generate api

* add 3 datasets for unimo-text

* fix tokenizer bug

* paddlenlp+lightseq sample

* Refine api docs and readme and fix baseline bug

* add shell srcipt

* remove lightseq samples

* minor fix

* minor fix

* Add news

* minor fix

* minor fix

* minor fix

Co-authored-by: Jiaqi Liu <[email protected]>
Co-authored-by: liu zhengxi <[email protected]>
zhangyuqin1998 pushed a commit to zhangyuqin1998/Paddle that referenced this pull request Feb 20, 2025
Co-authored-by: Aniket Shivam <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants