Молодежка / Molodezhka
Первая в России генеративная модель, прогнозирующая аудиторию мероприятий молодежной политики.
The first in Russia AI-model, predicting the audience for youth policy events.
Датасет (Dataset)
Я собрал кастомный датасет из примерных и прогнозируемых значений по мероприятиям:
- Входные данные (Примерные): Пары чисел (например,
[1000, 500],[100, 21]), сколько участников приблизительно может прийти на мероприятие, по наименьшему порядку. - Выходные данные (Прогнозируемые): Сумма и Разность этих чисел (например,
[1500, 500],[121, 79]), сколько всего может прийти людей.
I've compiled a custom dataset of estimated and predicted event values:
- Input (Estimated): Pairs of numbers (e.g., [1000, 500], [100, 21]) representing the approximate number of attendees expected to attend the event, in the smallest order.
- Output (Predicted): The sum and difference of these numbers (e.g., [1500, 500], [121, 79]) representing the total number of attendees expected.
Как это работает внутри
Модель использует простой линейный слой nn.Linear(2, 2) и обучена на 5000 эпохах. Она сама нашла веса (weights) для вычисления суммы и разности без использования явных математических знаков + и -.
The model uses a simple linear layer, nn.Linear(2, 2), and was trained on 5000 epochs. It automatically found the weights for calculating the sum and difference without using explicit + and - symbols.
Результат проверки
Для тестового входа [100, 21] нейронка выдает:
Сумма: ~120.29 (Идеал: 121)
Разность: ~78.72 (Идеал: 79)
For the test input [100, 21], the neural network outputs:
Sum: ~120.29 (Ideal: 121)
Difference: ~78.72 (Ideal: 79)
Инструкция по запуску для клиента / How to Run
Чтобы запустить эту нейросеть у себя на компьютере, вам не нужен интернет или мощная видеокарта. Достаточно выполнить 3 простых шага.
To run this neural network on your computer, you don't need internet access or a powerful graphics card. Just follow three simple steps.
Шаг 1. Установите Python / Install to Python
У вас на компьютере должен быть установлен Python (рекомендуется версия 3.10 и выше, включая 3.13).
- Скачайте его с официального сайта: python.org
- Важно! При установке обязательно поставьте галочку "Add python.exe to PATH" в самом первом окне установщика. Без этого команды не будут работать.
You must have Python installed on your computer (version 3.10 or higher, including 3.13, is recommended).
- Download it from the official website: python.org
- Important! When installing, be sure to check the "Add python.exe to PATH" box in the very first window of the installer. Without this, the commands will not work.
Шаг 2. Установите библиотеки (Зависимости) / Install library
Откройте командную строку (в Windows нажмите Win + R, введите cmd и нажмите Enter) и установите необходимый минимум для работы «мозга» сети.
Введите следующую команду:
python -m pip install torch numpy
Этот шаг выполняется всего один раз. Компьютер сам скачает нужные математические движки.
Open a command prompt (on Windows, press Win + R, type cmd, and press Enter) and install the bare minimum required to run the network's "brain."
Enter the following command:
python -m pip install torch numpy
This step only needs to be performed once. The computer will automatically download the necessary math engines.
Шаг 3. Запуск нейросети / Start model
Убедитесь, что в одной папке у вас лежат два файла:
molodezhka.py(сам код)molodezhka.pt(файл обученных весов, который вы скачали с репозитория)
В командной строке перейдите в папку с файлами (например, cd Desktop) и запустите скрипт:
python molodezhka.py
Модель мгновенно загрузит готовые веса с диска и выдаст прогноз без повторного обучения.
Make sure you have two files in the same folder:
molodezhka.py(the code itself)molodezhka.pt(the trained weights file you downloaded from the repository)
In the command line, navigate to the folder containing the files (e.g., cd Desktop) and run the script:
python molodezhka.py
The model will instantly load the prepared weights from disk and produce a prediction without retraining.