Pull to refresh

Comments 4

#Создадим экземпляр нашей нейросети и выведем ее структуру. Мы увидим количество слоев, количество параметров на входе и выходе у каждого слоя и наличие\отсутствие свободного члена.

net = Net()
print(net)
Net(
(fc1): Linear(in_features=2, out_features=50, bias=True)
(fc2): Linear(in_features=50, out_features=50, bias=True)
(fc3): Linear(in_features=50, out_features=1, bias=True)
)

Не работает.
File "<ipython-input-7-82bad3c48de0>", line 6
(fc1): Linear(in_features=2, out_features=50, bias=True)
^
SyntaxError: invalid syntax
UFO just landed and posted this here
Исполняемый код — только первые две строчки:
net = Net()
print(net)


Остальное — вывод print'а:
Net(
(fc1): Linear(in_features=2, out_features=50, bias=True)
(fc2): Linear(in_features=50, out_features=50, bias=True)
(fc3): Linear(in_features=50, out_features=1, bias=True)
)
Sign up to leave a comment.

Articles