D:\RealTimeObjectDetection>python Tensorflow/models/research/object_detection/model_main_tf2.py --model_dir=Tensorflow/workspace/models/my_ssd_mobnet --pipeline_config_path=Tensorflow/workspace/models/my_ssd_mobnet/pipeline.config --num_train_steps=10000
WARNING:tensorflow:From C:\Users\LENOVO\AppData\Roaming\Python\Python311\site-packages\keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
Traceback (most recent call last):
File “D:\RealTimeObjectDetection\Tensorflow\models\research\object_detection\model_main_tf2.py”, line 31, in
from object_detection import model_lib_v2
File “C:\ProgramData\anaconda3\Lib\site-packages\object_detection\model_lib_v2.py”, line 31, in
from object_detection import model_lib
File “C:\ProgramData\anaconda3\Lib\site-packages\object_detection\model_lib.py”, line 35, in
from object_detection.builders import optimizer_builder
File “C:\ProgramData\anaconda3\Lib\site-packages\object_detection\builders\optimizer_builder.py”, line 25, in
from official.modeling.optimization import ema_optimizer
File “C:\ProgramData\anaconda3\Lib\site-packages\official\modeling\optimization_init_.py”, line 19, in
from official.modeling.optimization.configs.optimization_config import *
File “C:\ProgramData\anaconda3\Lib\site-packages\official\modeling\optimization\configs\optimization_config.py”, line 31, in
@dataclasses.dataclass
^^^^^^^^^^^^^^^^^^^^^
File “C:\ProgramData\anaconda3\Lib\dataclasses.py”, line 1230, in dataclass
return wrap(cls)
^^^^^^^^^
File “C:\ProgramData\anaconda3\Lib\dataclasses.py”, line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\ProgramData\anaconda3\Lib\dataclasses.py”, line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\ProgramData\anaconda3\Lib\dataclasses.py”, line 815, in _get_field
raise ValueError(f’mutable default {type(f.default)} for field ’
ValueError: mutable default <class ‘official.modeling.optimization.configs.optimizer_config.SGDConfig’> for field sgd is not allowed: use default_factory