rixwew / pytorch-fm

Factorization Machine models in PyTorch
MIT License
1.04k stars 225 forks source link

one question about data process #32

Closed chenjw505 closed 3 years ago

chenjw505 commented 3 years ago

why the field use label encode? not one-hot encode?

rixwew commented 3 years ago

Matrix multiplication with one-hot encoding is equivalent to embedding lookup with label encoding. The latter is faster and saves memory, so we do it that way.