Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

flrngel/TagSpace-tensorflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TagSpace-tensorflow

model image of TagSpace

Tensorflow implementation of Facebook #TagSpace

You can read more about #TagSpace from here

Special thanks to Facebook research team's Starspace project, it was really good reference.

Key Concept

Beside choosing 1000 random negative tag (for performance reason I guess), I choosed worst positive tag, best negative tag for calculating WARP loss. It's not good for performance but since we don't have much tags(labels) as Facebook, it seems okay.

Usage

Download ag news dataset as below

$ tree ./data
./data
└── ag_news_csv
    ├── classes.txt
    ├── readme.txt
    ├── test.csv
    ├── train.csv
    └── train_mini.csv

and then

$ python train.py

Result

Accuracy 0.89 (ag test data, compare 0.91 from StarSpace with same condition [5 epoch, 10 dim])

To-do list

  • support multiple dataset
  • improve performance
  • adopt WARP sampling (now is just a WARP loss)
  • add Tensorboard metrics

Releases

No releases published

Packages

No packages published

Languages