tensorflow/core/tpu/tpu_embedding_configuration_proto_rewrite.cc
// Computes the input feature batch size based on the input feature shape. As
// we treat the last dimension as the reduction dimension, the batch size should
// be the product of all the axes except the last one.
Computes the input feature batch size based on the input feature shape. As
we treat the last dimension as the reduction dimension, the batch size should
be the product of all the axes except the last one.
Computes the input feature batch size based on the input feature shape . As we treat the last dimension as the reduction dimension the batch size should be the product of all the axes except the last one .
std::vector<int> ComputeInputFeatureBatchSizes(
    const tpu::TPUEmbeddingConfiguration& config) {
  std::vector<int32> input_feature_batch_sizes;
  for (int i = 0; i < config.feature_descriptor_size(); ++i) {
    const int32 batch_size =
        absl::c_accumulate(config.feature_descriptor(i).input_shape(),
                           1, std::multiplies<>());
    input_feature_batch_sizes.push_back(batch_size);
  }
  return input_feature_batch_sizes;
}
std :: vector < int > ComputeInputFeatureBatchSizes ( const tpu :: TPUEmbeddingConfiguration & config ) { std :: vector < int32 > input_feature_batch_sizes ; for ( int i = 0 ; i < config . feature_descriptor_size ( ) ; ++ i ) { const int32 batch_size = absl :: c_accumulate ( config . feature_descriptor ( i ) . input_shape ( ) , 1 , std :: multiplies < > ( ) ) ; input_feature_batch_sizes . push_back ( batch_size ) ; } return input_feature_batch_sizes ; }
Computes the input feature batch size based on the input feature shape.
Computes the input feature batch size based on the input feature shape .
/*init=*/