Assignment 2: Learning World representations.
This commit is contained in:
6
machine_learning/course2/assignment2/lookup.m
Normal file
6
machine_learning/course2/assignment2/lookup.m
Normal file
@@ -0,0 +1,6 @@
|
||||
% This function trains a neural network language model.
|
||||
function [words] = lookup( word, model )
|
||||
idx = strcmp( model.vocab, word );
|
||||
embd = model.word_embedding_weights' * idx'
|
||||
words = embd
|
||||
end
|
||||
Reference in New Issue
Block a user