Data Augmentation

(Zaid Alyafeai) #1

I am trying to randomly crop tensors to a specific size. I could see that there exists Raw.RandomCrop but it gives the error

Op RandomCrop is not available in GraphDef version 29

0 Likes

(brett koonce) #2

That is old legacy code from an early version of TensorFlow that no longer exists in mainline (was moved to python/keras). If you would like a swift version, check out lines 36-56 of main.swift in my imagenette demo:

ps an issue you could tackle:

if you’re not interested, I would be happy to convert your demo over!

2 Likes

(Zaid Alyafeai) #3

Thanks @asparagui I ended up using a similar approach but where I don’t loop over all the elements of the batch but rather using the same crop for the whole batch.

ps: I think somebody is already working on the neural style stuff. Which demo you mean ?

0 Likes

(brett koonce) #4

doh, got you mixed up with somebody else!

0 Likes