Giter Site home page Giter Site logo

cprec's Introduction

You can email me if you have any questions about the performance and efficiency of CpRec.

you can run nextitrec_eval.py (python nextitrec_eval.py) directly, which includes training and testing.  
Each training epoch, test once test set.  

The import configuration:

--softmax_type: This is used to control whether block-wise embedding is used. There are 5 classes:  
FullSoftmax:The input layer and output layer use basic embedding and softmax respectively.  
Block_Input_Full:Only the input layer uses block-wise embedding, and the output layer uses basic softmax.  
Block_for_Softmax:Only the output layer uses block-wise embedding, and the output layer uses basic softmax.  
Block_Input_Softmax:Both the input layer and the output layer use block-wise embedding.  
Block_Input_Softmax_Inference: Both the input layer and the output layer use block-wise embedding, but fast inference is used in the prediction stage. it should be noted that the use of this type requires batch_size_test = 1  
--use_parametersharing_type: This is used to control whether to use layer-wise parameter sharing, there are 5 classes:  
original:No parameter sharing.  
cross-layer:use the cross-layer parameter sharing.  
cross-block:use the cross-block parameter sharing.  
adjacent-layer:use the adjacent-layer parameter sharing.  
adjacent-block:use the adjacent-block parameter sharing.  

you should cross-valid the number of blocks and the embedding size of each block, but we strongly suggest you use 3~5 blocks.
--use_embedding_type_factor is the attenuation factor of block dimension in block-wise embedding, the default is 4. You can also manually set the dimension of each block, e.g. [300, 200, 100].

Dataset

you can download a large sequential dataset of movielen that has been pre-processed: https://pan.baidu.com/s/1XZCUoRwWFa8fpRWpEA2HPQ
code (提取码):fo51

References

https://github.com/fajieyuan/nextitnet code that including Caser and GRURec
https://github.com/graytowne/caser code

CpRec

A Generic Network Compression Framework for Sequential Recommender Systems

@article{sun2020generic,
  title={A Generic Network Compression Framework for Sequential Recommender Systems},
  author={Sun, Yang and Yuan, Fajie and Yang, Min and Wei, Guoao and Zhao, Zhou and Liu, Duo},
  journal={arXiv preprint arXiv:2004.13139},
  year={2020}
}

Please cite this paper if you find our code is useful.

cprec's People

Contributors

siatnlp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.