Caffe2 - C++ API
A deep learning, cross platform ML framework
embedding_lookup.h
1 #pragma once
2 
3 #include <cstdint>
4 
5 namespace caffe2 {
6 
32 template <
33  typename IndexType,
34  typename InType,
35  typename OutType,
36  bool IS_WEIGHT_POSITIONAL = false>
37 void EmbeddingLookup(
38  const std::int64_t block_size,
39  const std::int64_t output_size,
40  const std::int64_t index_size,
41  const std::int64_t data_size,
42  const InType* input,
43  const IndexType* indices,
44  const int* lengths,
45  const float* weights, // optional, can be null for non-weighted sum
46  const float* scale_bias, // optional scale & bias params for uint8 input
47  bool normalize_by_lengths,
48  OutType* out);
49 
50 } // namespace caffe2
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
void EmbeddingLookup(const std::int64_t block_size, const std::int64_t output_size, const std::int64_t index_size, const std::int64_t data_size, const InType *input, const IndexType *indices, const int *lengths, const float *weights, const float *scale_bias, bool normalize_by_lengths, OutType *out)
Embedding lookup with reduction.