autokeras/blocks/reduction.py

Killed 4 out of 6 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 100

--- autokeras/blocks/reduction.py
+++ autokeras/blocks/reduction.py
@@ -67,7 +67,7 @@
         inputs = nest.flatten(inputs)
         utils.validate_num_inputs(inputs, 1)
         input_node = inputs[0]
-        if len(input_node.shape) > 2:
+        if len(input_node.shape) >= 2:
             return layers.Flatten()(input_node)
         return input_node
 

Mutant 101

--- autokeras/blocks/reduction.py
+++ autokeras/blocks/reduction.py
@@ -67,7 +67,7 @@
         inputs = nest.flatten(inputs)
         utils.validate_num_inputs(inputs, 1)
         input_node = inputs[0]
-        if len(input_node.shape) > 2:
+        if len(input_node.shape) > 3:
             return layers.Flatten()(input_node)
         return input_node