Namespace faiss::nn
-
namespace nn
-
-
template<typename T>
struct Tensor2DTemplate Public Functions
-
Tensor2DTemplate(size_t n0, size_t n1, const T *data = nullptr)
-
Tensor2DTemplate &operator+=(const Tensor2DTemplate&)
-
Tensor2DTemplate column(size_t j) const
get column #j as a 1-column Tensor2D
-
inline size_t numel() const
-
inline T *data()
-
inline const T *data() const
-
Tensor2DTemplate(size_t n0, size_t n1, const T *data = nullptr)
-
struct Linear
- #include <NeuralNet.h>
minimal translation of nn.Linear
Public Functions
-
Linear(size_t in_features, size_t out_features, bool bias = true)
-
Linear(size_t in_features, size_t out_features, bool bias = true)
-
struct Embedding
- #include <NeuralNet.h>
minimal translation of nn.Embedding
Public Functions
-
Embedding(size_t num_embeddings, size_t embedding_dim)
-
Tensor2D operator()(const Int32Tensor2D&) const
-
inline float *data()
-
inline const float *data() const
-
Embedding(size_t num_embeddings, size_t embedding_dim)
-
struct FFN
- #include <NeuralNet.h>
Feed forward layer that expands to a hidden dimension, applies a ReLU non linearity and maps back to the orignal dimension
-
template<typename T>