Skip to content
Snippets Groups Projects
Commit 4151190b authored by Dennis Noll's avatar Dennis Noll
Browse files

[recipes] common: fixes blackout (higher order slice is an iterable itself so...

[recipes] common: fixes blackout (higher order slice is an iterable itself so we can not make this optional)
parent 0059cc00
No related branches found
No related tags found
No related merge requests found
......@@ -192,7 +192,6 @@ def Blackout(ref, slic, name=None):
shape = ref.shape[1:]
dtype = ref.dtype
mask = np.ones(shape, dtype=dtype)
slic = slic if isinstance(slic, Iterable) else (slic,)
for _slic in slic:
mask[_slic] = 0
return tf.keras.layers.Lambda((lambda x: x * mask), name=name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment