@with_setup(setup, teardown)
def test_top_filters():
 model = serial.load('dbm.pkl')
 (layer_1, layer_2) = model.hidden_layers[0:2]
 W1 = layer_1.get_weights()
 W2 = layer_2.get_weights()
 top_filters.get_mat_product_viewer(W1, W2)
 dataset_yaml_src = model.dataset_yaml_src
 dataset = yaml_parse.load(dataset_yaml_src)
 imgs = dataset.get_weights_view(W1.T)
 top_filters.get_connections_viewer(imgs, W1, W2)

@ with_setup ( setup , teardown ) def test_top_filters ( ) : model = serial . load ( 'dbm.pkl' ) ( layer_1 , layer_2 ) = model . hidden_layers [ 0 : 2 ] W1 = layer_1 . get_weights ( ) W2 = layer_2 . get_weights ( ) top_filters . get_mat_product_viewer ( W1 , W2 ) dataset_yaml_src = model . dataset_yaml_src dataset = yaml_parse . load ( dataset_yaml_src ) imgs = dataset . get_weights_view ( W1 . T ) top_filters . get_connections_viewer ( imgs , W1 , W2 )
test the top_filters viewer functions .