Formation of the neural network architecture of the model and downloading its weights to obtain personality traits scores (text modality)
_b5.text_model_b5_- Нейросетевая модель nn.Module для получения оценок персональных качеств
Import required packages
[2]:
from oceanai.modules.lab.build import Run
Build
[3]:
_b5 = Run(
lang = 'en', # Inference language
color_simple = '#333', # Plain text color (hexadecimal code)
color_info = '#1776D2', # The color of the text containing the information (hexadecimal code)
color_err = '#FF0000', # Error text color (hexadecimal code)
color_true = '#008001', # Text color containing positive information (hexadecimal code)
bold_text = True, # Bold text
num_to_df_display = 30, # Number of rows to display in tables
text_runtime = 'Runtime', # Runtime text
metadata = True # Displaying information about library
)
[2024-10-08 19:46:14] OCEANAI - персональные качества личности человека: Авторы: Рюмина Елена [ryumina_ev@mail.ru] Рюмин Дмитрий [dl_03.03.1991@mail.ru] Карпов Алексей [karpov@iias.spb.su] Сопровождающие: Рюмина Елена [ryumina_ev@mail.ru] Рюмин Дмитрий [dl_03.03.1991@mail.ru] Версия: 1.0.0a40 Лицензия: BSD License
Formation of neural network architectures of models
[4]:
res_load_text_model_b5 = _b5.load_text_model_b5(
show_summary = False, # Displaying the formed neural network architecture of the model
out = True, # Display
runtime = True, # Runtime count
run = True # Run blocking
)
[2024-10-08 19:46:14] Формирование нейросетевой архитектуры модели для получения оценок персональных качеств (текстовая модальность) …
— Время выполнения: 0.002 сек. —
Downloading weights of neural network models
FI V2
[5]:
# Настройки ядра
_b5.path_to_save_ = './models' # Директория для сохранения файла
_b5.chunk_size_ = 2000000 # Размер загрузки файла из сети за 1 шаг
url = _b5.weights_for_big5_['text']['fi']['b5']['googledisk']
res_load_text_model_weights_b5 = _b5.load_text_model_weights_b5(
url = url,
force_reload = False, # Принудительная загрузка файла с весами нейросетевой модели из сети
out = True, # Отображение
runtime = True, # Подсчет времени выполнения
run = True # Блокировка выполнения
)
[2024-10-08 19:46:14] Загрузка весов нейросетевой модели для получения оценок персональных качеств (текстовая модальность) …
[2024-10-08 19:46:16] Загрузка файла “ft_fi_2023-12-09_14-25-13.pth”
— Время выполнения: 2.297 сек. —
MuPTA
[6]:
# Настройки ядра
_b5.path_to_save_ = './models' # Директория для сохранения файла
_b5.chunk_size_ = 2000000 # Размер загрузки файла из сети за 1 шаг
url = _b5.weights_for_big5_['text']['mupta']['b5']['googledisk']
res_load_text_model_weights_b5 = _b5.load_text_model_weights_b5(
url = url,
force_reload = False, # Принудительная загрузка файла с весами нейросетевой модели из сети
out = True, # Отображение
runtime = True, # Подсчет времени выполнения
run = True # Блокировка выполнения
)
[2024-10-08 19:46:16] Загрузка весов нейросетевой модели для получения оценок персональных качеств (текстовая модальность) …
[2024-10-08 19:46:19] Загрузка файла “ft_mupta_2023-12-09_14-25-13.pth” 100.0% …
— Время выполнения: 2.532 сек. —
Displaying the formed neural network architecture of the model
[7]:
_b5.text_model_b5_
[7]:
text_model_b5(
(dense): Linear(in_features=10, out_features=5, bias=True)
)