CoolFace
Datasetpublic

ysn-rfd/text-dataset-tiny-code-script-py-format

USED of tahamajs/medicine_ds_persian for .parquet file USED of Alijafarixcs2/persian-it-llama2-2k for .parquet file USED of Abirate/english_quotes for .jsonl file NEW FILES (05/12/2025) NEW FILES (12/26/2025) NEW FILES (02/15/2026)

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
3likes1.7kdownloads
day4_1.py27 linesDownload Raw Back to pytorch_study
1import torch
2import torch.nn as nn
3import torch.nn.functional as F
4class simple_sd_model (nn.Module):
5    def __init__(self):
6        super(simple_sd_model, self).__init__()
7        self.fc1 = nn.Linear (1,1)
8        self.fc2 = nn.Linear (1,6)
9        self.fc3 = nn.Linear (6,7)
10        self.fc4 = nn.Linear (7,4)
11
12    def forward(self, x):
13        x = F.relu (self.fc1(x))
14        x = F.relu (self.fc2(x))
15        x = self.fc3(x)
16        x = self.fc4(x)
17        return x
18
19model = simple_sd_model()
20input_data = torch.rand (10, 1, requires_grad= True)
21output_data = model(input_data)
22print (output_data)
23
24
25
26
27