def modReLU(z, bias): # relu(|z|+b) * (z / |z|)
norm = tf.abs(z)
scale = tf.nn.relu(norm + bias) / (norm + 1e-6)
scaled = tf.complex(tf.real(z)*scale, tf.imag(z)*scale)
return scaled
###################################################################################################333
# 4k / 7k trainable params
评论列表
文章目录