diff --git a/Deep Learning/submission_template01.py b/Deep Learning/submission_template01.py index 1a8ded3..653fe8c 100644 --- a/Deep Learning/submission_template01.py +++ b/Deep Learning/submission_template01.py @@ -3,13 +3,19 @@ from torch import nn def create_model(): - # your code here - # return model instance (None is just a placeholder) + model = nn.Sequential(nn.Linear(784, 256), + nn.ReLU(), + nn.Linear(256, 16), + nn.ReLU(), + nn.Linear(16, 10)) - return None + return model def count_parameters(model): - # your code here - # return integer number (None is just a placeholder) - - return None + cnt = 0 + for i in model.parameters(): + if i.requires_grad == False: + continue + cnt += i.numel() + # верните количество параметров модели model + return cnt