Giter VIP home page Giter VIP logo

Comments (1)

ChunyuanLI avatar ChunyuanLI commented on August 27, 2024

Q1 about loss function (9) of label embeddings, what is the meaning of y_k, is it the label of embeddings or sequence class?
A1: y_k is the one-hot vector to represent the target (sequence class). Also in (9), c_k is the corresponding label embedding that we are going to learn.

Q2: If there are K=3 classes in the dataset, does it mean that there are 3 training sample for label ?
A2: If there are K=3 classes in the dataset, it means there are 3 label embeddings to learn (i.e., “3 training samples for labels”), one for each label.

Q3: How to process the label loss(9) in each batch of training case ?

A3: Note that label embeddings are associated with their corresponding label embeddings, i.e. each c_k is associated with its own y_k.

Eq (9) is a regularizer of the main loss (7). Therefore, for each text-label pair (x_n, y_nk), where n is the index of data sample, k is the ground-truth label (i.e. the k-th label), c_k is trained to satisfy two objectives: (A) stay in the center of its own class manifold, as imposed in (9); and (B) Attend the text sequence representation z_n in (7).

Sorry for the abuse of notations. A more correct but ugly formulation of (9) goes like this: 1/K sim_{k=1}^{K} sum_{n \in {n | y_n = k } } CE( y_nk, f_2(c_nk) )

from leam.

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.