08_word2vec
In [1]:
('Word count', [('cats', 10), ('dogs', 6), ('and', 5), ('are', 4), ('love', 3)])
('Sample data', [8, 33, 24, 20, 17, 12, 8, 25, 30, 26], ['the', 'quick', 'brown', 'fox', 'jumped', 'over', 'the', 'lazy', 'dog', 'I'])
('Context pairs', [[[8, 24], 33], [[33, 20], 24], [[24, 17], 20], [[20, 12], 17], [[17, 8], 12], [[12, 25], 8], [[8, 30], 25], [[25, 26], 30], [[30, 4], 26], [[26, 0], 4]])
('skip-gram pairs', [[33, 8], [33, 24], [24, 33], [24, 20], [20, 24]])
('Batches (x, y)', ([1, 27, 31], [[0], [0], [32]]))
('Loss at ', 0, 16.735144)
('Loss at ', 10, 10.094729)
('Loss at ', 20, 4.8836751)
('Loss at ', 30, 4.0771756)
('Loss at ', 40, 3.6998763)
('Loss at ', 50, 3.5778923)
('Loss at ', 60, 3.6107972)
('Loss at ', 70, 3.8399482)
('Loss at ', 80, 3.258163)
('Loss at ', 90, 3.4325538)
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/collections.py:548: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if self._edgecolors == 'face':
In [2]:
In [ ]: