Giter Site home page Giter Site logo

sc_artifacts_eval's Introduction

Zheng Wang

  • ๐Ÿ–๏ธ 2nd year PhD student at the department of Computer Science, UC Santa Barbara.
  • ๐Ÿ”ญ Iโ€™m currently working on high-performance computing and end-to-end optimization for deep learning.

sc_artifacts_eval's People

Contributors

ash-zheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sc_artifacts_eval's Issues

`offsets` parameter doesn't work for Eff_TTEmbedding?

It seems that the offsets parameter of Eff_TTEmbedding doesn't work.

My code is as follows:

import torch

import ELRec.Efficient_TT.efficient_tt as elrec

device_id = 2
device = torch.device('cuda:{}'.format(device_id))

if __name__ == '__main__':
    tt_ranks = [8, 8]
    embedding_dim = 12
    num_embeddings = 1_000_000
    indices = torch.LongTensor([0, 3, 23, 12, 3422, 75234, 2342, 12323, 342, 123]).to(device)
    offsets = torch.LongTensor([0, 3, 4, 5, 7, 11]).to(device)
    batch_size = 5

    el_emb = elrec.Eff_TTEmbedding(
        num_embeddings=num_embeddings,
        embedding_dim=embedding_dim,
        tt_ranks=tt_ranks,
        device=device_id,
        batch_size=batch_size,
    ).to(device)

    outputs = el_emb(indices, offsets)
    print(outputs.shape)

The expected result should be "torch.Size[5, 12]", but I get "torch.Size[10, 12]".

However, I cannot find an API like nn.EmbeddingBag, which means that pooling factor is not supported yet?

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.