tensorflow - Implementing a cropping/trimming layer in a convolutional neural net in Keras? -
currently i'm doing cropping prior training model. means have make separate step when inferring isn't ideal. there tensorflow/keras implementations of cropping layer?
if not, there reason 1 shouldn't part of neural net?
in tensorflow, can crop tensor slicing in numpy
, e.g. t_cropped = t[:,10:20,::-1,...]
. information on notation can found on documentation of tf.strided_slice
, in fine called slicing.
if goal implemant random cropping prior feeding network, tf.random_crop
dedicated tensorflow operation that.
Comments
Post a Comment