concept row in category deep learning

appears as: rows, rows, row, row
Deep Learning with Structured Data

This is an excerpt from Manning's book Deep Learning with Structured Data.

In October 2012 a team of students working with Geoffrey Hinton (a leading academic proponent of deep learning based at the University of Toronto) announced a result in the ImageNet computer vision contest that achieved accuracy in identifying objects that was close to twice that of the nearest competitor. This result exploited deep learning and ushered in an explosion of interest in the topic. In the years since 2012 we have seen deep learning applications with world-class results in many domains, including image processing, audio to text, and machine translation. In the last couple of years the tools and infrastructure for deep learning have reached a level of maturity and accessibility that make it possible for non-specialists to take advantage of deep learning’s benefits. This book shows you how you can leverage deep learning to get insights and make predictions about structured data (that is, data organized as tables with rows and columns, as in a relational database). You will see the capability of deep learning by going step-by-step through a complete, end-to-end example of deep learning from the raw input structured data to making the deep learning model available to end users.  By applying deep learning to a problem with a real-world structured dataset, you will see the challenges and opportunities of deep learning with structured data.

Compare this to the total number of rows in the dataset:

Figure 5.10: refactored dataframe step by step
Figure 5.9: refactored dataset with a row for each route / direction / timeslot combination
Deep Learning with PyTorch

This is an excerpt from Manning's book Deep Learning with PyTorch.

# In[2]:
img_t = torch.randn(3, 5, 5) # shape [channels, rows, columns]
weights = torch.tensor([0.2126, 0.7152, 0.0722])

Note that only 20 of the bad_indexes entries are set to True! By using a feature in PyTorch called advanced indexing, we can use a tensor with data type torch.bool to index the data tensor. This will essentially filter data to be only items (or rows) corresponding to True in the indexing tensor. The bad_indexes tensor has the same shape as target, with values of False or True depending on the outcome of the comparison between our threshold and each element in the original target tensor:

# In[14]:
bad_data = data[bad_indexes]
bad_data.shape
 
# Out[14]:
torch.Size([20, 11])

Note that the new bad_data tensor has 20 rows, the same as the number of rows with True in the bad_indexes tensor. It retains all 11 columns. Now we can start to get information about wines grouped into good, middling, and bad categories. Let’s take the .mean() of each column: