From 9e051d5f797cf6819a9965bceb46f569afb01101 Mon Sep 17 00:00:00 2001 From: carefree0910 Date: Fri, 26 Feb 2021 14:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8FOptimized=20default=20`Zoo`?= =?UTF-8?q?=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cflearn/api/zoo.py | 58 ++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/cflearn/api/zoo.py b/cflearn/api/zoo.py index b62baf328..29262b237 100644 --- a/cflearn/api/zoo.py +++ b/cflearn/api/zoo.py @@ -96,7 +96,11 @@ def register( # fcnn Zoo.register("fcnn", "default") -Zoo.register("fcnn", "light_bn", head_configs={"fcnn": {"hidden_units": [128]}}) +Zoo.register( + "fcnn", + "min_max", + increment_configs={"data_config": {"default_numerical_process": "min_max"}}, +) Zoo.register( "fcnn", "on_large", @@ -104,60 +108,48 @@ def register( ) Zoo.register( "fcnn", - "light", - head_configs={ - "fcnn": {"hidden_units": [128], "mapping_configs": {"batch_norm": False}} - }, + "on_log_large", + head_configs={"fcnn": {"mapping_configs": {"dropout": 0.1, "batch_norm": False}}}, + increment_configs={"data_config": {"default_numerical_process": "logarithm"}}, ) Zoo.register( "fcnn", - "on_sparse", - head_configs={ - "fcnn": { - "hidden_units": [128], - "mapping_configs": {"dropout": 0.9, "batch_norm": False}, - } + "light", + head_configs={"fcnn": {"mapping_configs": {"batch_norm": False}}}, + increment_configs={ + "data_config": {"binning_method": "opt"}, + "model_config": {"default_encoding_configs": {"embedding_dim": 8}}, }, - increment_configs={"optimizer_config": {"lr": 1e-4}}, ) # tree dnn Zoo.register("tree_dnn", "default") +Zoo.register( + "tree_dnn", + "min_max", + increment_configs={"data_config": {"default_numerical_process": "min_max"}}, +) Zoo.register( "tree_dnn", "on_large", - head_configs={ - "dndf": {"dndf_config": None}, - "fcnn": {"mapping_configs": {"dropout": 0.1}}, - }, + head_configs={"fcnn": {"mapping_configs": {"dropout": 0.1, "batch_norm": False}}}, ) Zoo.register( "tree_dnn", - "light", - head_configs={ - "dndf": {"dndf_config": None}, - "fcnn": {"mapping_configs": {"batch_norm": False}}, - }, - increment_configs={ - "model_config": {"default_encoding_configs": {"embedding_dim": 8}} - }, + "on_log_large", + head_configs={"fcnn": {"mapping_configs": {"dropout": 0.1, "batch_norm": False}}}, + increment_configs={"data_config": {"default_numerical_process": "logarithm"}}, ) Zoo.register( "tree_dnn", - "on_sparse", + "light", head_configs={ "dndf": {"dndf_config": None}, - "fcnn": { - "mapping_configs": { - "dropout": 0.9, - "batch_norm": False, - "pruner_config": None, - } - }, + "fcnn": {"mapping_configs": {"batch_norm": False}}, }, increment_configs={ - "optimizer_config": {"lr": 1e-4}, + "data_config": {"binning_method": "opt"}, "model_config": {"default_encoding_configs": {"embedding_dim": 8}}, }, )