#505·DeepCTR

Why Linear layer mode 0 will keep dimension for the sparse feature while mode 2 will not?

Author: fengyinyangCreated Dec 9, 2022Updated Dec 9, 2022
Labelsquestion

In deepctr tensorflow package, the output for Linear if only sparse features are presented would be the reduce_sum(sparse_input, axis=-1, keep_dims=True), but if there are both sparse and dense features, the output would be reduce_sum(sparse_input, axis=-1, keep_dims=False), what's the rationale for that? Thanks