fbshipit-source-id: ba600fcd2b5cefc7621357bdeb05e24cea02e5af

This commit is contained in:
Orion Reblitz-Richardson
2018-06-27 04:50:56 -07:00
parent 290d20b094
commit 9ec0a2aef4
69 changed files with 989 additions and 300 deletions
+4 -4
View File
@@ -340,10 +340,10 @@ TEST_CASE("integration/mnist", "[cuda]") {
auto linear2 = model->add(Linear(50, 10), "linear2");
auto forward = [&](torch::Tensor x) {
x = at::max_pool2d(conv1->forward(x), {2, 2}).relu();
x = std::get<0>(at::max_pool2d(conv1->forward(x), {2, 2})).clamp_min(0);
x = conv2->forward(x);
x = drop2d->forward(x);
x = at::max_pool2d(x, {2, 2}).relu();
x = std::get<0>(at::max_pool2d(x, {2, 2})).clamp_min(0);
x = x.view({-1, 320});
x = linear1->forward(x).clamp_min(0);
@@ -377,10 +377,10 @@ TEST_CASE("integration/mnist/batchnorm", "[cuda]") {
auto linear2 = model->add(Linear(50, 10), "linear2");
auto forward = [&](torch::Tensor x) {
x = at::max_pool2d(conv1->forward(x), {2, 2}).relu();
x = std::get<0>(at::max_pool2d(conv1->forward(x), {2, 2})).clamp_min(0);
x = batchnorm2d->forward(x);
x = conv2->forward(x);
x = at::max_pool2d(x, {2, 2}).relu();
x = std::get<0>(at::max_pool2d(x, {2, 2})).clamp_min(0);
x = x.view({-1, 320});
x = linear1->forward(x).clamp_min(0);