GithubHelp home page GithubHelp logo

cdssm's Introduction

Note: Currently, we only have torch c version batch input sparse linear and sparse covolution.

##implementation of (c)DSSM in torch

##dependencies:

  • torch
  • tds (DSSM dense)

##Data Preprocessing ###Related Functions:

  • Batch.lua
  • WordHash.lua
  • ComputelogPD.lua
  • Preprocess.lua

##Tranining 1: generate data from dataset. The data format follows the C# implementation. Each query and document in the same line, and the seperator is 'Tab'. 2: generate vocabulary for question and answers. Using WordHash.Pair2Voc(). you should get the result like this: ''' Creating Voc file form ... srcVoc contains vocabulary: 5584 tgtVoc contains vocabulary: 10876 ''' 3: Create Pair2Seq Feature and save to txt. Using WordHash.Pair2SeqFea()

4: Convert the seq Feature to Binay file, we give the batchsize here. (this can't be change after you train the model. for orginial data, the batch size is 1024. Using WordHash.SeqFea2Bin(), See more info under the function.

###Related functions

  • (Data Provider): BatchSample.lua, SequenceInputStream.lua, PairInputStream.lua
  • (Model): DSSM_Train, DSSM_MMI_Criterion.lua
  • (Training): th train.lua

##Predicting 1: generate feature file, refer PreProcess.lua for details

  • Preprocessing:

  • (Predict): th predict.lua

##To-do List

  • testing the cu implementation of sparse Linear.
  • implement the cu implementation of sparse convolution.

cdssm's People

Contributors

jiasenlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cdssm's Issues

Help on NCE implementation

Hello,
I'm a newbie with torch and willing to make a simple version of DSSM.
After looking around in your code, I found that (may be) you didn't implement the NCE criterion for the model.
I tried to understand your code of MMI criterion but I coudn't.
So can you help me by showing some cues how to calculate the NCE criterion (as in the DSSM paper)?
Thank in advance!

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.