/
stupin
/
DreamNet
Обзор
Документация
Войти
/
stupin
/
DreamNet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
App.py
42 строки
1 KB
Stupin
init
25 июн 2025, 19:54
25 июн 2025, 19:54
b04fcff
Код
Авторство
О чём код?
from torch import nn import pygame screen = pygame.display.set_mode((1920, 1080)) class DiscNet() class GenNet(nn.Module): def __init__(self, resolution: int, history_frames_count): super().__init__() self.res = resolution self.lin1 = nn.Linear(21, 480 * 270) self.conv1 = nn.Sequential(nn.Conv2d(1 + 3 * history_frames_count, 64, kernel_size=3, padding=1), nn.BatchNorm2d(64), nn.ReLU(inplace=True)) self.conv3 = nn.Sequential(nn.Conv2d(64, 3, kernel_size=3, padding=1)) def forward(self, x): out = self.conv1(x) out = self.conv2(out) out = self.conv3(out) return out class ResNet(nn.Module): def main() -> None: while True: # Video output here and keys handler for event in pygame.event.get(): if event.type == pygame.QUIT: return pygame.display.update() if __name__ == '__main__': main()