dot

dot, function

def autodiff pure dot(x: embedding, y: embedding): number

Returns the dot product of the embeddings x and y.

Example

table T = with
  [| as Group |]
  [| "A" |]
  [| "B" |]
  [| "B" |]

T.E = embzero()

show table "Embedding dot product" with
  T.Group
  dot(sum(T.E) default embzero(), embzero()) as "Dot"
  group by T.Group

This outputs the following table:

Group Dot
A 0.5103008
B 0.7654513

Remarks

dot is available inside autodiff blocks.

See also

User Contributed Notes
0 notes + add a note