當前位置: 首頁>>代碼示例>>Python>>正文


Python Config.get_model方法代碼示例

本文整理匯總了Python中configuration.Config.get_model方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.get_model方法的具體用法?Python Config.get_model怎麽用?Python Config.get_model使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在configuration.Config的用法示例。


在下文中一共展示了Config.get_model方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: ImageSet

# 需要導入模塊: from configuration import Config [as 別名]
# 或者: from configuration.Config import get_model [as 別名]
'''====================================Train and test================================================'''
data_set = ImageSet(training_data_path=     config.project.train_img_folder_path,
                   testing_data_path=       config.project.test_img_folder_path,
                   mean_image_file_name=    config.data.mean_image_file_name,
                   driver_list_file=        config.data.driver_list_file,
                   augmentation_postfix=    config.data.augmentation_postfix,
                   fragment_size=	      config.data.fragment_size,
                   img_size=		      config.data.img_size,
                   validation_split=        config.data.validation_split,
                   batch_size=	           config.data.batch_size,
                   class_num=	           config.data.class_num)
                                         
keras_extractor = KerasFeatureExtractor(model_name=                                    config.nn.model_name,
                                        data_set=                                      data_set,
                                        model_inference=                               config.get_model(),
                                        model_arch_file=                               config.nn.model_arch_file_name,
                                        model_weight_file=                            config.nn.model_weight_file_name,
                                        feature_layer_index=                           config.feature.feature_layer_index,
                                        feature_folder=                                 config.feature.feature_folder
                                        )
#                                        training_feature_file_prefix=                  config.feature.training_feature_file_prefix,
#                                        training_label_file_prefix=                    config.feature.training_label_file_prefix,
##                                        training_feature_fragment_num=                 config.feature.training_feature_fragment_num,
#                                        testing_feature_file_prefix=                   config.feature.testing_feature_file_prefix,
#                                        testing_name_file_prefix=                      config.feature.testing_name_file_prefix,
##                                        testing_feature_fragment_num=                  config.feature.testing_feature_fragment_num,
#                                        validation_feature_file_prefix=                config.feature.validation_feature_file_prefix,
#                                        validation_label_file_prefix=                  config.feature.validation_label_file_prefix)
#                                        validation_features_fragment_num=              config.feature.validation_feature_fragment_num,)
#images = np.random.rand(32, 3, 224, 224)
開發者ID:fucusy,項目名稱:kaggle-state-farm-distracted-driver-detection,代碼行數:32,代碼來源:extract_features.py


注:本文中的configuration.Config.get_model方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。