Giter Club home page Giter Club logo

Comments (4)

danieldk avatar danieldk commented on May 31, 2024

It would be nice to have it, but post-0.5.

from finalfrontier.

sebpuetz avatar sebpuetz commented on May 31, 2024

I had a look into this today, this is messy.

The only case where serialization of a context-model is straight forward, is for skipgram. Although structgram and dirgram both have stringly keys, we still need some additional typing in order to distinguish between different offsets. This could certainly be done by appending numbers to the vocab items, but we'd need to handle this for all models differently and wouldn't be able to do so in a common implementation.

Also, while writing this I ended up with this monster of a fn signature for a generic implementation of the writing trait:

impl<W, T, IV, OV, M> WriteModelBinaryWithContexts<W> for TrainModel<T>
where
    W: Seek + Write,
    T: Trainer<InputVocab = IV, OutputVocab = OV, Metadata = M>,
    M: Serialize,
    IV: Vocab<VocabType = String>,
    for<'a> &'a IV::IdxType: IntoIterator<Item = u64>,
    OV: Vocab<VocabType = String>,
    for<'a> &'a OV::IdxType: IntoIterator<Item = u64>,
    for<'b> VocabWrap: From<&'b IV> + From<&'b OV>,

from finalfrontier.

danieldk avatar danieldk commented on May 31, 2024

Meh, too large a type signature indeed.

from finalfrontier.

sebpuetz avatar sebpuetz commented on May 31, 2024

I'm not working on this and I don't think there's any interest for it, closing this for now.

from finalfrontier.

Related Issues (20)

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.