From ef1471a251d8d43d1e0661220deae02b325b35c9 Mon Sep 17 00:00:00 2001 From: Yilei Yang Date: Wed, 30 Aug 2023 15:21:21 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 561465374 --- official/projects/centernet/configs/centernet.py | 2 +- .../text_classification_example/classification_example.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/official/projects/centernet/configs/centernet.py b/official/projects/centernet/configs/centernet.py index e42c0f4840..fb1663ec52 100644 --- a/official/projects/centernet/configs/centernet.py +++ b/official/projects/centernet/configs/centernet.py @@ -71,7 +71,7 @@ class DataConfig(cfg.DataConfig): is_training: bool = True dtype: str = 'float16' decoder: DataDecoder = dataclasses.field(default_factory=DataDecoder) - parser: Parser = Parser() + parser: Parser = dataclasses.field(default_factory=Parser) shuffle_buffer_size: int = 10000 file_type: str = 'tfrecord' drop_remainder: bool = True diff --git a/official/projects/text_classification_example/classification_example.py b/official/projects/text_classification_example/classification_example.py index d3c60194f6..61e6b9d4a2 100644 --- a/official/projects/text_classification_example/classification_example.py +++ b/official/projects/text_classification_example/classification_example.py @@ -47,7 +47,7 @@ class ClassificationExampleConfig(cfg.TaskConfig): # At most one of `init_checkpoint` and `hub_module_url` can be specified. init_checkpoint: str = '' hub_module_url: str = '' - model: ModelConfig = ModelConfig() + model: ModelConfig = dataclasses.field(default_factory=ModelConfig) num_classes = 2 class_names = ['A', 'B']