def testLayerNums(self): l1 = fully_connected.FullyConnectedLayer(self.params, 0, None) self.assertEquals(l1.layer_num, 0) l2 = fully_connected.FullyConnectedLayer(self.params, 1, None) self.assertEquals(l2.layer_num, 1) l3 = fully_connected.FullyConnectedLayer(self.params, 2, None) self.assertEquals(l3.layer_num, 2)
def __init__(self, params, device_assigner=None, optimizer_class=adagrad.AdagradOptimizer, **kwargs): super(NN, self).__init__(params, device_assigner=device_assigner, optimizer_class=optimizer_class, **kwargs) self.layers = [ fully_connected.FullyConnectedLayer( params, 0, device_assigner=device_assigner) ]
def __init__(self, params, device_assigner=None, optimizer_class=adagrad.AdagradOptimizer, **kwargs): super(DecisionsToDataThenNN, self).__init__( params, device_assigner=device_assigner, optimizer_class=optimizer_class, **kwargs) self.layers = [decisions_to_data.DecisionsToDataLayer(params, 0, device_assigner), fully_connected.FullyConnectedLayer( params, 1, device_assigner=device_assigner)]
def __init__(self, params, device_assigner=None, optimizer_class=adagrad.AdagradOptimizer, **kwargs): super(ForestToDataThenNN, self).__init__(params, device_assigner=device_assigner, optimizer_class=optimizer_class, **kwargs) self.layers = [[ decisions_to_data.KFeatureDecisionsToDataLayer( params, i, device_assigner) for i in range(self.params.num_trees) ], fully_connected.FullyConnectedLayer( params, self.params.num_trees, device_assigner=device_assigner)]