Skip to content

Commit

Permalink
Merge pull request #2 from Qwinpin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
LaFa777 authored Aug 16, 2018
2 parents 0f74837 + 0035b2a commit 1d450fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def main():
evaluator = neuvol.Evaluator(x_train, y_train, kfold_number=1)
mutator = neuvol.Mutator()

evaluator.set_create_tokens = False
evaluator._fitness_measure = 'f1'
evaluator.create_tokens = False
evaluator.fitness_measure = 'f1'
options = {'classes': 2, 'shape': (100,), 'depth': 4}

wop = neuvol.evolution.Evolution(
Expand Down
9 changes: 3 additions & 6 deletions neuvol/architecture/individ_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ def _check_compatibility(self):
output_shape.append(previous_shape[0])

# *out does not work with python < 3.5
for item in out:
output_shape.append(item)
output_shape.extend(out)

output_shape.append(filters)
output_shape = tuple(output_shape)
Expand All @@ -172,8 +171,7 @@ def _check_compatibility(self):
output_shape.append(previous_shape[0])

# *previous_shape[1:-1] does not work with python < 3.5
for item in previous_shape[1:-1]:
output_shape.append(item)
output_shape.extend(previous_shape[1:-1])

output_shape.append(units * bi)
output_shape = tuple(output_shape)
Expand All @@ -186,8 +184,7 @@ def _check_compatibility(self):
output_shape.append(previous_shape[0])

# *previous_shape[1:-1] does not work with python < 3.5
for item in previous_shape[1:-1]:
output_shape.append(item)
output_shape.append(previous_shape[1:-1])

output_shape.append(units)
output_shape = tuple(output_shape)
Expand Down
5 changes: 0 additions & 5 deletions tests/test_evolution_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ def test_evolution_mutation(self):
self.evolution.mutation_step()
self.assertEqual(10, len(self.evolution.population_raw_individ()))

@unittest.expectedFailure
def test_evolution_step(self):
self.evolution.step()
self.assertEqual(10, len(self.evolution.population_raw_individ()))

def test_evolution_crossing(self):
self.evolution.crossing_step()
self.assertEqual(10, len(self.evolution.population_raw_individ()))

0 comments on commit 1d450fc

Please sign in to comment.