'How to set possbility to tf.keras.layers.RandomFlip?
Is there possible to set a possibility when doing random flip operations by using tf.keras.layers.RandomFlip ?
for example:
def augmentation():
data_augmentation = keras.Sequential([
keras.layers.RandomFlip("horizontal", p=0.5),
keras.layers.RandomRotation(0.2, p=0.5)
])
return data_augmentation
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|