def _distribution_to_params(self, distribution, batch_shape):
params_shape = tf.concat([batch_shape, [-<NUM_LIT:1>]], axis=<NUM_LIT:0>)<EOL>batch_and_n_shape = tf.concat(<EOL>[tf.shape(input=distribution.mixture_distribution.logits), [-<NUM_LIT:1>]],<EOL>axis=<NUM_LIT:0>)<EOL>cd = distribution.components_distribution.distribution<EOL>return tf.concat([<EOL>distribution.mixture_distribution.logits,<EOL>tf.reshape(tf.concat([<EOL>tf.reshape(cd.loc, batch_and_n_shape),<EOL>tf.reshape(tfd.softplus_inverse(cd.scale), batch_and_n_shape)<EOL>], axis=-<NUM_LIT:1>), params_shape),<EOL>], axis=-<NUM_LIT:1>)<EOL>
Given a self.layer_class instance, return a tensor of its parameters.