February 2018
Intermediate to advanced
262 pages
6h 59m
English
Throughout the rest of the chapter, we will come across different types of layers. To begin, let's try to understand one of the most important layers, the linear layer, which does exactly what our previous network architecture does. The linear layer applies a linear transformation:
What makes it powerful is that fact that the entire function that we wrote in the previous chapter can be written in a single line of code, as follows:
from torch.nn import LinearmyLayer = Linear(in_features=10,out_features=5,bias=True)
The myLayer in the preceding code will accept a tensor of size 10 and outputs a ...