pytorch
a68c5249 - Use F::*FuncOptions for embedding/embeddingbag functionals (#29673)

Commit
5 years ago
Use F::*FuncOptions for embedding/embeddingbag functionals (#29673) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29673 Following https://github.com/pytorch/pytorch/pull/29364 and https://github.com/pytorch/pytorch/pull/29404, this PR makes `F::EmbeddingFuncOptions` and `F::EmbeddingBagFuncOptions` separate classes from `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`, so that it's easier to enforce that arguments such as `num_embeddings` and `embedding_dim` are required for `torch::nn::EmbeddingOptions` and `torch::nn::EmbeddingBagOptions`. Test Plan: Imported from OSS Differential Revision: D18462540 Pulled By: yf225 fbshipit-source-id: f2abf431e48675b0a9d7f6f398cdb90ff9037c35
Author
Will Feng
Parents
Loading