space after comma

This commit is contained in:
Bernardo 2019-08-02 10:24:58 -03:00 committed by Reuben Morais
parent 49c6a9c973
commit b89fb04b97
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ def augment_pitch_and_tempo(spectrogram,
new_height = tf.cast(tf.cast(original_shape[1], tf.float32)*choosen_pitch, tf.int32) new_height = tf.cast(tf.cast(original_shape[1], tf.float32)*choosen_pitch, tf.int32)
new_width = tf.cast(tf.cast(original_shape[2], tf.float32)/(choosen_tempo), tf.int32) new_width = tf.cast(tf.cast(original_shape[2], tf.float32)/(choosen_tempo), tf.int32)
spectrogram_aug = tf.image.resize_bilinear(tf.expand_dims(spectrogram, -1), [new_height, new_width]) spectrogram_aug = tf.image.resize_bilinear(tf.expand_dims(spectrogram, -1), [new_height, new_width])
spectrogram_aug = tf.image.crop_to_bounding_box(spectrogram_aug, offset_height=0, offset_width=0, target_height=tf.minimum(original_shape[1],new_height), target_width=tf.shape(spectrogram_aug)[2]) spectrogram_aug = tf.image.crop_to_bounding_box(spectrogram_aug, offset_height=0, offset_width=0, target_height=tf.minimum(original_shape[1], new_height), target_width=tf.shape(spectrogram_aug)[2])
spectrogram_aug = tf.cond(choosen_pitch < 1, spectrogram_aug = tf.cond(choosen_pitch < 1,
lambda: tf.image.pad_to_bounding_box(spectrogram_aug, offset_height=0, offset_width=0, lambda: tf.image.pad_to_bounding_box(spectrogram_aug, offset_height=0, offset_width=0,
target_height=original_shape[1], target_width=tf.shape(spectrogram_aug)[2]), target_height=original_shape[1], target_width=tf.shape(spectrogram_aug)[2]),