From 3b02532adc4ac83ce472134d769d6de36b988453 Mon Sep 17 00:00:00 2001 From: Naga Anjaneyulu Karumuri Date: Sun, 25 Feb 2024 03:47:33 -0500 Subject: [PATCH] Update autogradyt_tutorial.py Constants were defined but not used in the model, they are hardcoded. I updated the code so the model uses the defined constants. --- beginner_source/introyt/autogradyt_tutorial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beginner_source/introyt/autogradyt_tutorial.py b/beginner_source/introyt/autogradyt_tutorial.py index f5bc50c3b91..abf75a7d266 100644 --- a/beginner_source/introyt/autogradyt_tutorial.py +++ b/beginner_source/introyt/autogradyt_tutorial.py @@ -250,9 +250,9 @@ class TinyModel(torch.nn.Module): def __init__(self): super(TinyModel, self).__init__() - self.layer1 = torch.nn.Linear(1000, 100) + self.layer1 = torch.nn.Linear(DIM_IN, HIDDEN_SIZE) self.relu = torch.nn.ReLU() - self.layer2 = torch.nn.Linear(100, 10) + self.layer2 = torch.nn.Linear(HIDDEN_SIZE, DIM_OUT) def forward(self, x): x = self.layer1(x)