Formation of the neural network architecture of the model and downloading its weights to obtain features / scores based on hand-crafted features (audio modality)
_b5.audio_model_hc_- Нейросетевая модель nn.Module для получения признаков / оценок на базе экспертных признаков
Import required packages
[2]:
from oceanai.modules.lab.build import Run
Build
[3]:
_b5 = Run(
lang = 'en', # Interface 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 20:29:20] 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 the neural network architecture of the model
[4]:
res_load_audio_model_hc = _b5.load_audio_model_hc(
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 20:29:20] Формирование нейросетевой архитектуры модели для получения оценок по экспертным признакам (аудио модальность) …
— Время выполнения: 0.003 сек. —
Downloading the weights of the neural network model
[5]:
# Настройки ядра
_b5.path_to_save_ = './models' # Директория для сохранения файла
_b5.chunk_size_ = 2000000 # Размер загрузки файла из сети за 1 шаг
url = _b5.weights_for_big5_['audio']['fi']['hc']['googledisk']
res_load_audio_model_weights_hc = _b5.load_audio_model_weights_hc(
url = url, # Полный путь к файлу с весами нейросетевой модели
force_reload = True, # Принудительная загрузка файла с весами нейросетевой модели из сети
out = True, # Отображение
runtime = True, # Подсчет времени выполнения
run = True # Блокировка выполнения
)
[2024-10-08 20:29:20] Загрузка весов нейросетевой модели для получения оценок по экспертным признакам (аудио модальность) …
[2024-10-08 20:29:23] Загрузка файла “weights_2022-05-05_11-27-55.pth” 100.0% …
— Время выполнения: 2.868 сек. —
Displaying the formed neural network architecture of the model
[6]:
_b5.audio_model_hc_
[6]:
audio_model_hc(
(lstm1): LSTM(25, 64, batch_first=True)
(dropout1): Dropout(p=0.2, inplace=False)
(lstm2): LSTM(64, 128, batch_first=True)
(dropout2): Dropout(p=0.2, inplace=False)
(fc): Linear(in_features=128, out_features=5, bias=True)
)