def test_3lnn_load_dataset(self): il_nn = 2 hl_nn = [4] ol_nn = 2 nn = NeuralNetwork(il_nn, hl_nn, ol_nn) scd = DemoDataset() scd.init_random_training_indexes() scd.danku_init() nn.load_dataset(scd) nn.init_network() assert (not isinstance(nn.tf_weights, type(None))) assert (not isinstance(nn.tf_init, type(None))) assert (not isinstance(nn.tf_layers, type(None)))
def test_3lnn_load_dataset(): il_nn = 2 hl_nn = [4] ol_nn = 2 nn = NeuralNetwork(il_nn, hl_nn, ol_nn) scd = SampleHalfDividedDataset() scd.init_random_training_indexes() scd.cyphai_init() nn.load_dataset(scd) nn.init_network() assert (not isinstance(nn.tf_weights, type(None))) assert (not isinstance(nn.tf_init, type(None))) assert (not isinstance(nn.tf_layers, type(None)))
def test_train_2lnn(): il_nn = 2 hl_nn = [] ol_nn = 2 nn = NeuralNetwork(il_nn, hl_nn, ol_nn) scd = SampleHalfDividedDataset(training_percentage=0.8) scd.init_random_training_indexes() scd.danku_init() nn.load_dataset(scd) nn.init_network() nn.train() assert (not isinstance(nn.tf_weights, type(None))) assert (not isinstance(nn.tf_init, type(None))) assert (not isinstance(nn.tf_layers, type(None)))