Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MultiNodeBatchNormalization #106

Merged
merged 20 commits into from
Aug 24, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add version checks to tests
  • Loading branch information
iwiwi committed Aug 15, 2017
commit 947563a07a2cd1b07d39d2a56084b4c053cd4026
9 changes: 9 additions & 0 deletions tests/links_tests/test_batch_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import chainer.testing.attr
import chainer.utils
import mpi4py.MPI
import nose.plugins.skip
import numpy
import unittest

Expand Down Expand Up @@ -51,7 +52,15 @@ def setUp(self):
self.mpi_comm = mpi4py.MPI.COMM_WORLD
self.communicator = NaiveCommunicator(self.mpi_comm)

def test_version_check(self):
if chainer.__version__.startswith('1.'):
with self.assertRaises(RuntimeError):
chainermn.links.MultiNodeBatchNormalization(3, self.communicator)

def test_multi_node_bn(self):
if chainer.__version__.startswith('1.'):
raise nose.plugins.skip.SkipTest()

comm = self.communicator

local_batchsize = 10
Expand Down