#NEWLINE# def test_unspecified_batch_size( ) : #NEWLINE# #INDENT# m = 1 #NEWLINE# dim = 2 #NEWLINE# rng = np . random . RandomState ( [ 2014 , 3 , 17 ] ) #NEWLINE# X = rng . randn ( m , dim ) #NEWLINE# train = DenseDesignMatrix ( X = X ) #NEWLINE# rbm = RBM ( nvis = dim , nhid = 3 ) #NEWLINE# trainer = DefaultTrainingAlgorithm ( ) #NEWLINE# try : #NEWLINE# #INDENT# trainer . setup ( rbm , train ) #NEWLINE# #UNINDENT# except NoBatchSizeError : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# raise AssertionError ( 'Missed the lack of a batch size' )