reformatted test strings and fixed test
@@ -223,10 +223,8 @@ class ModelToDotFormatTest(tf.test.TestCase, parameterized.TestCase):
def get_layer_ids_from_model(model, layer_range):
layer_range = layer_utils.get_layer_index_bound_by_layer_name(
model, layer_range)
- layer_ids_from_model = []
- for i, layer in enumerate(model.layers):
- if i >= layer_range[0] and i <= layer_range[1]:
- layer_ids_from_model.append(str(id(layer)))
+ layer_ids_from_model = [
+ str(id(layer)) for layer in model.layers[layer_range[0]:layer_range[1]]]
return layer_ids_from_model
