среда, 18 ноября 2020 г.

PyTorch, Values

Continuous, ordinal, and categorical values

We should be aware of three different kinds of numerical values as we attempt to

make sense of our data.3 The first kind is continuous values. These are the most intuitive

when represented as numbers. They are strictly ordered, and a difference

between various values has a strict meaning. Stating that package A is 2 kilograms

heavier than package B, or that package B came from 100 miles farther away than A

has a fixed meaning, regardless of whether package A is 3 kilograms or 10, or if B

came from 200 miles away or 2,000. If you’re counting or measuring something with

units, it’s probably a continuous value. The literature actually divides continuous values

further: in the previous examples, it makes sense to say something is twice as

heavy or three times farther away, so those values are said to be on a ratio scale.

The time of day, on the other hand, does have the notion of difference, but it is not

reasonable to claim that 6:00 is twice as late as 3:00; so time of day only offers an

interval scale.

Next we have ordinal values. The strict ordering we have with continuous values

remains, but the fixed relationship between values no longer applies. A good example

of this is ordering a small, medium, or large drink, with small mapped to the value 1,

medium 2, and large 3. The large drink is bigger than the medium, in the same way

that 3 is bigger than 2, but it doesn’t tell us anything about how much bigger. If we

were to convert our 1, 2, and 3 to the actual volumes (say, 8, 12, and 24 fluid

ounces), then they would switch to being interval values. It’s important to remember

that we can’t “do math” on the values outside of ordering them; trying to average

large = 3 and small = 1 does not result in a medium drink!

Finally, categorical values have neither ordering nor numerical meaning to their values.

These are often just enumerations of possibilities assigned arbitrary numbers. Assigning

water to 1, coffee to 2, soda to 3, and milk to 4 is a good example. There’s no

real logic to placing water first and milk last; they simply need distinct values to differentiate

them. We could assign coffee to 10 and milk to –3, and there would be no

significant change (though assigning values in the range 0..N – 1 will have advantages

for one-hot encoding and the embeddings we’ll discuss in section 4.5.4.) Because

the numerical values bear no meaning, they are said to be on a nominal scale.

______________________________________________________________________________

Important

Непрерывные, порядковые и категориальные значения

Мы должны знать о трех различных видах числовых значений, когда пытаемся

разобраться в наших данных3. Первый вид - это непрерывные значения. Это самые интуитивно понятные

когда они представлены в виде чисел. Они строго упорядочены, и разница

между различными значениями имеет строгое значение. Заявление о том, что пакет А составляет 2 килограмма

тяжелее, чем пакет B, или этот пакет B прибыл на 100 миль дальше, чем A

имеет фиксированное значение, независимо от того, весит ли пакет A 3 килограмма или 10, или если B

приехал из 200 миль или 2000. Если вы что-то считаете или измеряете

единиц, вероятно, это непрерывное значение. Литература фактически разделяет непрерывные значения

далее: в предыдущих примерах имеет смысл сказать, что что-то вдвое больше

тяжелее или в три раза дальше, поэтому считается, что эти значения относятся к шкале отношений.

Время суток, с другой стороны, имеет понятие разницы, но это не так.

разумно утверждать, что 6:00 вдвое позже 3:00; поэтому время суток предлагает только

интервальная шкала.

Далее у нас порядковые значения. У нас строгий порядок с непрерывными значениями

остается, но фиксированная связь между значениями больше не применяется. Хороший пример

из этого - заказ маленького, среднего или большого напитка с малым, сопоставленным со значением 1,

средний 2 и большой 3. Большой напиток больше среднего, точно так же

что 3 больше 2, но ничего не говорит нам о том, насколько больше. Если мы

должны были преобразовать наши 1, 2 и 3 в фактические объемы (скажем, 8, 12 и 24 жидкости

унций), то они переключатся на интервальные значения. Важно помнить

что мы не можем «вычислять» значения, не упорядочивая их; пытаясь усреднить

большой = 3 и маленький = 1 не дает средний напиток!

Наконец, категориальные значения не имеют ни упорядочения, ни числового значения для своих значений.

Часто это просто перечисление возможностей, которым присвоены произвольные номера. Назначение

вода - 1, кофе - 2, газировка - 3, молоко - 4 - хороший пример. Нет никаких

реальная логика размещения воды в первую очередь и молока в последнюю очередь; им просто нужны разные значения, чтобы различать

их. Мы могли бы присвоить кофе значение 10, а молоко - –3, и не было бы

существенное изменение (хотя присвоение значений в диапазоне 0..N - 1 будет иметь преимущества

для быстрого кодирования и встраивания мы обсудим в разделе 4.5.4.) Потому что

числовые значения не имеют смысла, они, как говорят, находятся в номинальной шкале.




PyTorch, Docs

 https://pytorch.org/docs/stable/index.html

понедельник, 16 ноября 2020 г.

TensorBoard, Install

Installing TensorBoard can be done with either pip or conda:

pip install tensorboard

conda install tensorboard

PyTorch requires v1.14 or above of TensorBoard.

TensorBoard can then be started on the command line:

tensorboard --logdir=runs

You can then go to http://[your-machine]:6006, where you’ll see the welcome screen

воскресенье, 15 ноября 2020 г.

PyTorch, Install

 pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

https://aka.ms/vs/16/release/vc_redist.x64.exe - Обязательно

https://pytorch.org/get-started/locally/

import torch
x = torch.rand(5, 3)
print(x)
Examples:
https://pytorch.org/tutorials/beginner/pytorch_with_examples.html

понедельник, 4 мая 2020 г.

RL Resource

Deep Learning RL David Silver

https://www.youtube.com/playlist?list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ

https://www.youtube.com/watch?v=2pWv7GOvuf0&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=2&t=0s

https://www.youtube.com/watch?v=lfHX2hHRMVQ&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=2

https://www.youtube.com/watch?v=Nd1-UUMVfz4&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=3

https://www.youtube.com/watch?v=PnHCvfgC_ZA&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=4

https://www.youtube.com/watch?v=0g4j2k_Ggc4&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=5

https://www.youtube.com/watch?v=UoPei5o4fps&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=6

https://www.youtube.com/watch?v=KHZVXao4qXs&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=7

https://www.youtube.com/watch?v=ItMutbeOHtc&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=8

https://www.youtube.com/watch?v=sGuiWX07sKw&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=9

https://www.youtube.com/watch?v=kZ_AUmFcZtk&list=PLbWDNovNB5mqFBgq7i3MY6Ui4zudcvNFJ&index=10

NN Deep Learning Kozlov


https://www.youtube.com/playlist?list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb

https://www.youtube.com/watch?v=_q46x0tq2FQ&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=1

https://www.youtube.com/watch?v=1BUuB28FDOc&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=2

https://www.youtube.com/watch?v=kWTC1NvL894&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=3

https://www.youtube.com/watch?v=tnrbx7V9RbA&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=4

https://www.youtube.com/watch?v=2gIn9cVn9cA&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=5

https://www.youtube.com/watch?v=tOgBz8lFz8Q&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=6

https://www.youtube.com/watch?v=r2KA99ThEH4&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=7

https://www.youtube.com/watch?v=ajEQ10s8XRg&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=8

https://www.youtube.com/watch?v=MBQdMQUZMQM&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=9

https://www.youtube.com/watch?v=tlj-CMibdMI&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=10

https://www.youtube.com/watch?v=JpS0LzEWr-4&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=11

https://www.youtube.com/watch?v=qKL9hWQQQic&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=12

https://www.youtube.com/watch?v=_x0ASf9jV9U&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=13

https://www.youtube.com/watch?v=aOIK1i1xt_M&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=14

https://www.youtube.com/watch?v=V9TuLKhaDqQ&list=PL5FkQ0AF9O_o2Eb5Qn8pwCDg7TniyV1Wb&index=15

https://openai.com/

https://iclr.cc/

http://karpathy.github.io/2016/05/31/rl/

http://www.tadviser.ru/index.php/%D0%9F%D0%B5%D1%80%D1%81%D0%BE%D0%BD%D0%B0:%D0%9A%D0%B0%D1%80%D0%BF%D0%B0%D1%82%D1%8B%D0%B9_%D0%90%D0%BD%D0%B4%D1%80%D0%B5%D0%B9_(Andrej_Karpathy)