We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b917a1b commit c1d7379Copy full SHA for c1d7379
art/estimators/classification/tensorflow.py
@@ -1301,9 +1301,10 @@ def get_activations(
1301
i_layer = i_name
1302
break
1303
elif isinstance(layer, int):
1304
- if layer < 0 or layer >= len(self.layer_names):
+ if layer < -len(self.layer_names) or layer >= len(self.layer_names):
1305
raise ValueError(
1306
- "Layer index %d is outside of range (0 to %d included)." % (layer, len(self.layer_names) - 1)
+ "Layer index %d is outside of range (-%d to %d)."
1307
+ % (layer, len(self.layer_names), len(self.layer_names) - 1)
1308
)
1309
i_layer = layer
1310
else:
0 commit comments