+ def transformation(self, t, scene):
+ col, shp = scene
+ if t == 0:
+ col, shp = col.flip(0), shp.flip(0)
+ description = "<chg> vertical flip"
+ elif t == 1:
+ col, shp = col.flip(1), shp.flip(1)
+ description = "<chg> horizontal flip"
+ elif t == 2:
+ col, shp = col.flip(0).t(), shp.flip(0).t()
+ description = "<chg> rotate 90 degrees"
+ elif t == 3:
+ col, shp = col.flip(0).flip(1), shp.flip(0).flip(1)
+ description = "<chg> rotate 180 degrees"
+ elif t == 4:
+ col, shp = col.flip(1).t(), shp.flip(1).t()
+ description = "<chg> rotate 270 degrees"
+
+ return (col.contiguous(), shp.contiguous()), description
+
+ def random_transformations(self, scene):