def _parameter_control_dependencies(self, is_init): assertions = categorical_lib.maybe_assert_categorical_param_correctness( is_init, self.validate_args, self._probs, self._logits) if not self.validate_args: return assertions if is_init != tensor_util.is_ref(self.total_count): assertions.extend(distribution_util.assert_nonnegative_integer_form( self.total_count)) return assertions
def _parameter_control_dependencies(self, is_init): assertions = categorical_lib.maybe_assert_categorical_param_correctness( is_init, self.validate_args, self._probs, self._logits) if not self.validate_args: return assertions if is_init != tensor_util.is_ref(self.total_count): total_count = tf.convert_to_tensor(self.total_count) assertions.append(distribution_util.assert_casting_closed( total_count, target_dtype=tf.int32)) assertions.append(assert_util.assert_non_negative(total_count)) return assertions