Formation of neural network architectures of models and downloading their weights to obtain the personality traits scores (audio, video and tex fusion)


  • _b5.avt_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 22:06:21] 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_avt_model_b5 = _b5.load_avt_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 22:06:21] Формирование нейросетевой архитектуры модели для получения оценок персональных качеств (мультимодальное объединение) …

— Время выполнения: 0.007 сек. —

Downloading weights of neural network models

[5]:
# Настройки ядра
_b5.path_to_save_ = './models' # Директория для сохранения файла
_b5.chunk_size_ = 2000000 # Размер загрузки файла из сети за 1 шаг

url = _b5.weights_for_big5_['avt']['fi']['b5']['googledisk']

res_load_avt_model_weights_b5 = _b5.load_avt_model_weights_b5(
    url = url,
    force_reload = False, # Принудительная загрузка файла с весами нейросетевой модели из сети
    out = True, # Отображение
    runtime = True, # Подсчет времени выполнения
    run = True # Блокировка выполнения
)

[2024-10-08 22:06:21] Загрузка весов нейросетевой модели для получения оценок персональных качеств (мультимодальное объединение) …

[2024-10-08 22:06:24] Загрузка файла “avt_fi_2023-12-03_11-36-51.pth” 100.0% …

— Время выполнения: 3.541 сек. —

Displaying the formed neural network architecture of the model

[6]:
_b5.avt_model_b5_
[6]:
avt_model_b5(
  (ln_hc_t): LayerNormalization(
    (layer_norm): LayerNorm((128,), eps=1e-05, elementwise_affine=True)
  )
  (ln_nn_t): LayerNormalization(
    (layer_norm): LayerNorm((128,), eps=1e-05, elementwise_affine=True)
  )
  (ln_hc_a): LayerNormalization(
    (layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
  )
  (ln_nn_a): LayerNormalization(
    (layer_norm): LayerNorm((512,), eps=1e-05, elementwise_affine=True)
  )
  (ln_hc_v): LayerNormalization(
    (layer_norm): LayerNorm((256,), eps=1e-05, elementwise_affine=True)
  )
  (ln_nn_v): LayerNormalization(
    (layer_norm): LayerNorm((2048,), eps=1e-05, elementwise_affine=True)
  )
  (gf_ta): GFL()
  (gf_tv): GFL()
  (gf_av): GFL()
  (fc1): Linear(in_features=192, out_features=50, bias=True)
  (fc2): Linear(in_features=50, out_features=5, bias=True)
)