The first place that you will be directed is here: https://cs.stanford.edu/people/karpathy/convnetjs
but there will be much more too.
For the purpose of natural language, we will look at this module: NLTK
And maybe start with this youtube tutorial: makemore
The toolkit is on GitHub: https://github.com/karpathy/makemore
The original dataset (around 32,000 names) is here: https://www.ssa.gov/oact/babynames
a quick note on sorting in python (a few methods):
This method avoids lambda functions:
def get_value(item): return item[1]
my_dict = {'a': 3, 'b': 1, 'c': 2}
sorted_dict = dict(sorted(my_dict.items(), key=get_value, reverse=True))
print(sorted_dict)
This method uses lambda functions:
my_dict = {'a': 3, 'b': 1, 'c': 2}
# Sort the dictionary by value using the items() method
sorted_dict = dict(sorted(my_dict.items(), key=lambda item: item[1], reverse=True))
print(sorted_dict)
some requirements
pip install torch
pip install ipywidgets
test code:
import torch
# 5 rows, 3 columns
x = torch.rand(5, 3)
print(x)
The result is this:
tensor([[0.2297, 0.4190, 0.2671],
[0.5142, 0.1679, 0.4740],
[0.9949, 0.1533, 0.7456],
[0.3277, 0.4973, 0.2362],
[0.5808, 0.7602, 0.2213]])