stay resnet Medium _make_layer Last in function return nn.Sequential(*layers)
With an asterisk :
Example :
List = ['a', 2, 3]
Tuple = ('b', 'c', 5)
Dict = {
'name': 'Ada', 'age': 23}
print(List)
print(Tuple)
print(Dict)
print(*List)
print(*Tuple)
print(*Dict)
import numpy as np
ndarray = np.array([2, 3, 4])
print(ndarray)
print(*ndarray)
##################################
# The output is as follows :
'''
['a', 2, 3]
('b', 'c', 5)
{
'name': 'Ada', 'age': 23}
{
2, 4, 5}
a 2 3
b c 5
name age
2 4 5
[2 3 4]
2 3 4
'''
As can be seen from the above : In the list 、 Tuples 、 Dictionaries 、 aggregate 、 Array preceded by *, The printed output shows that , The elements in these data structures are divided into independent elements one by one .
Reprinted from :python In the list 、 Elements 、 Dictionaries 、 The collection and numpy Add an asterisk to the array of * What does it mean , as well as *args and **kwargs Use