# \#2 PyTorch Book Thread: Sunday, 5th Sept 8AM PT

**URL:** <https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431>\
**Category:** PyTorch Book Reading Group\
**Created:** [September 5, 2021, 11:57am UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431 "2021-09-05T11:57:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhutanisanyam1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/bhutanisanyam1/32/18_2.png) [@bhutanisanyam1](https://community.wandb.ai/u/bhutanisanyam1)\
**Post date:** [September 5, 2021, 11:57am UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/1 "2021-09-05T11:57:54Z")

</div>

Note: This is a wiki, please edit it & add resources!

YouTube Link: [PyTorch Book Reading - 2. Tensors, Autograd & NNs in PyTorch - YouTube](https://www.youtube.com/watch?v=oxDfljg_qkM)

Hey Everyone!  
This thread is for discussing, Q&A, and everything else for the #2 meetup of the book reading group.

We’ll continue reading Ch-3 and make it to Ch-6. The goal is to learn about Tensors, modelling and autograd.

[Link to sign up](http://wandb.me/pytorch-reading)

Resources:

- [(Purchase) Link to the book](https://www.manning.com/books/deep-learning-with-pytorch) Use Discount Code " **podchai20**" for a 40% discount (Not an affliate link)
- [(Free Link to download book, courtesy of PyTorch website)](https://pytorch.org/assets/deep-learning/Deep-Learning-with-PyTorch.pdf)
- [Chai Time Data Science Interview w the Authors](https://www.youtube.com/watch?v=f5Qv3eSZpug&t=3s)
- [Deep Learning with PyTorch Jupyter Notebooks](https://github.com/deep-learning-with-pytorch/dlwpt-code)
- [Different ways of getting datasets for your data science tasks](https://pandeyparul.medium.com/different-ways-of-getting-datasets-for-your-data-science-tasks-ecb159bf7893)

Homework suggestions:

- Explain the different slicing operations on line 55 of the [tensors notebook](https://github.com/deep-learning-with-pytorch/dlwpt-code/blob/master/p1ch3/1_tensors.ipynb)
- Read about `imageio` and `torchvision`
- Undersrand what the [`torch.unsqueeze`](https://pytorch.org/docs/stable/generated/torch.unsqueeze.html) function in PyTorch does
- Understand what the `tensor.permute` method does and consider contributing to the PyTorch documentation
- Understand the [bike share notebook](https://github.com/deep-learning-with-pytorch/dlwpt-code/blob/master/p1ch4/4_time_series_bikes.ipynb) with time series data
- Experiment with loading different datasets into PyTorch. See [this blog](https://pandeyparul.medium.com/different-ways-of-getting-datasets-for-your-data-science-tasks-ecb159bf7893) on getting different datasets
- Create a cheat sheet of the PyTorch functions we’ve learned about so far
- Read about the `h5py` python package

[\<\<\<\< Previous Session Thread](https://community.wandb.ai/t/1-pytorch-book-thread-sunday-29-aug-8-am-pt/211)

---

<div class="post-metadata">

**Author:** ![bhutanisanyam1](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/bhutanisanyam1/32/18_2.png) [@bhutanisanyam1](https://community.wandb.ai/u/bhutanisanyam1)\
**Post date:** [September 5, 2021, 3:03pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/2 "2021-09-05T15:03:41Z")

</div>

What are torch tensors?

---

<div class="post-metadata">

**Author:** ![girijesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/girijesh/32/39_2.png) [@girijesh](https://community.wandb.ai/u/girijesh)\
**Post date:** [September 5, 2021, 3:04pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/3 "2021-09-05T15:04:13Z")

</div>

The Basic Data Structure in pytorch!!

---

<div class="post-metadata">

**Author:** ![shashank2806](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@shashank2806](https://community.wandb.ai/u/shashank2806)\
**Post date:** [September 5, 2021, 3:04pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/4 "2021-09-05T15:04:30Z")

</div>

What is the difference between transfer learning and fine-tuning?

---

<div class="post-metadata">

**Author:** ![simplysumanth](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/simplysumanth/32/160_2.png) [@simplysumanth](https://community.wandb.ai/u/simplysumanth)\
**Post date:** [September 5, 2021, 3:04pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/5 "2021-09-05T15:04:35Z")

</div>

They are the core data structures used for building Neural Networks. Basically its Numpy on Gpu (and little more).

---

<div class="post-metadata">

**Author:** ![aadil](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/aadil/32/152_2.png) [@aadil](https://community.wandb.ai/u/aadil)\
**Post date:** [September 5, 2021, 3:04pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/6 "2021-09-05T15:04:43Z")

</div>

A torch  
Tensor is a multi-dimensional matrix containing elements of a single data type.

---

<div class="post-metadata">

**Author:** ![gautham20](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/gautham20/32/105_2.png) [@gautham20](https://community.wandb.ai/u/gautham20)\
**Post date:** [September 5, 2021, 3:11pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/7 "2021-09-05T15:11:29Z")

</div>

Deep learning requires less FE - does this apply in general to tabular data too?

---

<div class="post-metadata">

**Author:** ![aadil](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/aadil/32/152_2.png) [@aadil](https://community.wandb.ai/u/aadil)\
**Post date:** [September 5, 2021, 3:14pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/8 "2021-09-05T15:14:19Z")

</div>

Transfer Learning a basically an idea which involves using a model which is originally trained for a different task say A model train of ImageNet for classification to a different task say object detection of classification into a class which was not in the original dataset.

Fine-tuning is basically the same thing , just it’s implementation which includes things such as adding a new final layer and then training the entire model for the new task. [Many other techniques are involved. You can check Jeremy Howard’s lecture on [fast.ai](http://fast.ai), it’s really nice]

---

<div class="post-metadata">

**Author:** ![aadil](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/aadil/32/152_2.png) [@aadil](https://community.wandb.ai/u/aadil)\
**Post date:** [September 5, 2021, 3:18pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/9 "2021-09-05T15:18:56Z")

</div>

Depends. Many of time it may happen that Deep Learning might not give good results while ML algos like Random Forest, XGBOOST, etc. performs awesomely on the same.

But the place where deep learning works, FE is significantly lesser than traditional ML. Again depends on dataset.

---

<div class="post-metadata">

**Author:** ![boredmgr](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@boredmgr](https://community.wandb.ai/u/boredmgr)\
**Post date:** [September 5, 2021, 3:20pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/11 "2021-09-05T15:20:24Z")

</div>

A small analogy that we can think of is.  
Fine tuning is when a organization hires the graduate and make them learn the stuff that will make the graduate efficient for current deliverable.  
So the organization was able to use transfer learning ( using the prior knowledge of graduate) and make them learn just the stuff which is most important for the current task in hand.

---

<div class="post-metadata">

**Author:** ![durgaamma2005](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/durgaamma2005/32/117_2.png) [@durgaamma2005](https://community.wandb.ai/u/durgaamma2005)\
**Post date:** [September 5, 2021, 3:26pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/12 "2021-09-05T15:26:16Z")

</div>

where can I get the notebooks …any links?

---

<div class="post-metadata">

**Author:** ![simplysumanth](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/simplysumanth/32/160_2.png) [@simplysumanth](https://community.wandb.ai/u/simplysumanth)\
**Post date:** [September 5, 2021, 3:29pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/13 "2021-09-05T15:29:50Z")

</div>

what is the difference between - .cpu() and .detach() ?

---

<div class="post-metadata">

**Author:** ![girijesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/girijesh/32/39_2.png) [@girijesh](https://community.wandb.ai/u/girijesh)\
**Post date:** [September 5, 2021, 3:29pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/14 "2021-09-05T15:29:58Z")

</div>

> **[GitHub - deep-learning-with-pytorch/dlwpt-code: Code for the book Deep...](https://github.com/deep-learning-with-pytorch/dlwpt-code)**
>
> Code for the book Deep Learning with PyTorch by Eli Stevens, Luca Antiga, and Thomas Viehmann. - GitHub - deep-learning-with-pytorch/dlwpt-code: Code for the book Deep Learning with PyTorch by Eli ...

---

<div class="post-metadata">

**Author:** ![yuvraj](https://avatars.discourse-cdn.com/v4/letter/y/b5a626/32.png) [@yuvraj](https://community.wandb.ai/u/yuvraj)\
**Post date:** [September 5, 2021, 3:37pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/15 "2021-09-05T15:37:59Z")

</div>

We can use stride may be?

---

<div class="post-metadata">

**Author:** ![girijesh](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/girijesh/32/39_2.png) [@girijesh](https://community.wandb.ai/u/girijesh)\
**Post date:** [September 5, 2021, 3:38pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/16 "2021-09-05T15:38:11Z")

</div>

Reshape or extend the dim

---

<div class="post-metadata">

**Author:** ![durgaamma2005](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/durgaamma2005/32/117_2.png) [@durgaamma2005](https://community.wandb.ai/u/durgaamma2005)\
**Post date:** [September 5, 2021, 3:38pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/17 "2021-09-05T15:38:11Z")

</div>

using stride I guess

---

<div class="post-metadata">

**Author:** ![matt24](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/matt24/32/62_2.png) [@matt24](https://community.wandb.ai/u/matt24)\
**Post date:** [September 5, 2021, 3:38pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/18 "2021-09-05T15:38:21Z")

</div>

I guess we can reshape it

---

<div class="post-metadata">

**Author:** ![radhika](https://avatars.discourse-cdn.com/v4/letter/r/d6d6ee/32.png) [@radhika](https://community.wandb.ai/u/radhika)\
**Post date:** [September 5, 2021, 3:38pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/19 "2021-09-05T15:38:55Z")

</div>

Reshape the image in required format

---

<div class="post-metadata">

**Author:** ![shashank2806](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@shashank2806](https://community.wandb.ai/u/shashank2806)\
**Post date:** [September 5, 2021, 3:39pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/20 "2021-09-05T15:39:49Z")

</div>

can also use opencv i guess

---

<div class="post-metadata">

**Author:** ![boredmgr](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@boredmgr](https://community.wandb.ai/u/boredmgr)\
**Post date:** [September 5, 2021, 3:49pm UTC](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431/21 "2021-09-05T15:49:25Z")

</div>

skip reading the column header

[Next page](https://community.wandb.ai/t/2-pytorch-book-thread-sunday-5th-sept-8am-pt/431.md?page=2)
