File size: 814 Bytes
747451d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# /*---------------------------------------------------------------------------------------------
#  * Copyright (c) 2022-2023 STMicroelectronics.
#  * All rights reserved.
#  *
#  * This software is licensed under terms that can be found in the LICENSE file in
#  * the root directory of this software component.
#  * If no LICENSE file comes with this software, it is provided AS-IS.
#  *--------------------------------------------------------------------------------------------*/

import os
from omegaconf import DictConfig


def prepare_kwargs_for_model(cfg: DictConfig):

    dropout = cfg.training.dropout if cfg.training and 'dropout' in cfg.training else None

    model_kwargs = {
        'input_shape': getattr(cfg.model, 'input_shape', None),
        'dropout': dropout,
    }

    return model_kwargs