Options
All
  • Public
  • Public/Protected
  • All
Menu

Featurize queries by pooling words embedding using SWEM-concat(*).

(*): Dinghan Shen, Guoyin Wang, Wenlin Wang, Martin Renqiang Min, Qinliang Su, Yizhe Zhang, Chunyuan Li, Ricardo Henao, Lawrence Carin- 2018. Baseline Needs More Love: On Simple Word-Embedding-Based Models and Associated Pooling Mechanisms.

Hierarchy

Index

Constructors

constructor

Properties

Protected actions

actions: any[]

The list of every action the model can take.

Readonly id

id: "Word Embedding" = "Word Embedding"

Readonly size

size: number

Private vectors

vectors: KeyedVectors

Methods

export

getActionMask

  • getActionMask(): boolean[]
  • Produce an action mask according to featurizer state. (Generally, this method is reimplemented in stateful featurizers)

    Returns boolean[]

    An array of boolean mapping every actions availability.

getOptimizableFeatures

  • getOptimizableFeatures(data: any): tf.Tensor1D
  • Turn the data returned by handleQuery into an embedding vector. This function is used to expose featurizer variables to the model optimizer for training.

    Reimplementing this method is not necessary if your featurizer is not meant to be optimizable through gradient descent. In this case, just return the feature vector directly using the handleQuery method.

    remarks

    It's important to keep this function stateless, it should only depend of its tensor argument and of featurizer's variables.

    Parameters

    • data: any

    Returns tf.Tensor1D

handleAction

  • handleAction(action: any): void

handleQuery

  • handleQuery(query: string): Promise<tf.Tensor1D>

init

  • init(actions: any[]): Promise<void>

load

resetDialog

  • resetDialog(): void

Legend

  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Function
  • Type alias
  • Enumeration
  • Interface
  • Inherited method
  • Private property

Generated using TypeDoc