提交 5a381956 编写于 作者: T Tao Luo 提交者: Yi Wang

reduce elasped time of test_LayerGrad (#5478)

上级 797249bc
...@@ -53,7 +53,7 @@ TEST(Operator, dot_mul) { ...@@ -53,7 +53,7 @@ TEST(Operator, dot_mul) {
TEST(Projection, context) { TEST(Projection, context) {
for (auto contextStart : {-5, -3, -1, 0, 3}) { for (auto contextStart : {-5, -3, -1, 0, 3}) {
for (auto contextLength : {1, 2, 5, 7}) { for (auto contextLength : {1, 2, 5, 7}) {
for (auto batchSize : {1, 2, 5, 20, 50}) { for (auto batchSize : {1, 2, 5, 20}) {
for (auto trainablePadding : {false, true}) { for (auto trainablePadding : {false, true}) {
LOG(INFO) << " contextStart=" << contextStart LOG(INFO) << " contextStart=" << contextStart
<< " contextLength=" << contextLength << " contextLength=" << contextLength
...@@ -585,14 +585,14 @@ TEST(Layer, maxoutLayer) { ...@@ -585,14 +585,14 @@ TEST(Layer, maxoutLayer) {
} }
void testFcLayer(string format, size_t nnz) { void testFcLayer(string format, size_t nnz) {
TestConfig config; TestConfig config;
config.biasSize = 4096; config.biasSize = 1024;
config.layerConfig.set_type("fc"); config.layerConfig.set_type("fc");
config.layerConfig.set_size(4096); config.layerConfig.set_size(1024);
config.layerConfig.set_active_type("sigmoid"); config.layerConfig.set_active_type("sigmoid");
config.layerConfig.set_drop_rate(0.1); config.layerConfig.set_drop_rate(0.1);
config.inputDefs.push_back( config.inputDefs.push_back(
{INPUT_DATA, "layer_0", 8192, nnz, ParaSparse(format)}); {INPUT_DATA, "layer_0", 2048, nnz, ParaSparse(format)});
config.layerConfig.add_inputs(); config.layerConfig.add_inputs();
LOG(INFO) << config.inputDefs[0].sparse.sparse << " " LOG(INFO) << config.inputDefs[0].sparse.sparse << " "
...@@ -609,9 +609,9 @@ void testFcLayer(string format, size_t nnz) { ...@@ -609,9 +609,9 @@ void testFcLayer(string format, size_t nnz) {
} }
TEST(Layer, fcLayer) { TEST(Layer, fcLayer) {
testFcLayer("", 4096 * 4096 * 2); testFcLayer("", 1024 * 1024 * 2);
testFcLayer("csc", 4096 * 40); testFcLayer("csc", 1024 * 10);
testFcLayer("csr", 4096 * 40); testFcLayer("csr", 1024 * 10);
} }
TEST(Layer, SelectiveFullyConnectedLayer) { TEST(Layer, SelectiveFullyConnectedLayer) {
...@@ -1995,7 +1995,7 @@ TEST(Layer, multibox_loss) { ...@@ -1995,7 +1995,7 @@ TEST(Layer, multibox_loss) {
TEST(Layer, TransLayer) { TEST(Layer, TransLayer) {
TestConfig config; TestConfig config;
const int height = 128; const int height = 128;
const int width = 1028; const int width = 256;
config.layerConfig.set_type("trans"); config.layerConfig.set_type("trans");
config.layerConfig.set_size(width); config.layerConfig.set_size(width);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册