jeudi 30 janvier 2020

Can we make different random sequences at each batch?

I wonder we are possible to make different random sequences at each batch with lambda layer in functional API

for example

main_input=Input(shape=(67),name='main_input')
noised_data = Lambda(noising,name='adding_noise_layer')(main_input)
def noising(x):
  noise_real = 1/(np.sqrt(2)*)*K.random_normal((67,),mean=0,stddev=1)
  noise_imag = 1/(np.sqrt(2)*)*K.random_normal((67,),mean=0,stddev=1)
  noise = tf.reshape(tf.dtypes.complex(noise_real,noise_imag), (1,67,))
  return x+noise

In this case, Does each batch add different random noise????




Aucun commentaire:

Enregistrer un commentaire