AttributeError: 'EasyDict' object has no attribute 'TRAIN'
desenzhou opened this issue · 3 comments
I'm using feature_extraction for IDN but encounters the above problem during building network in tensorflow, anyone can help me? thanks!
Traceback (most recent call last):
File "tools/extract.py", line 58, in
net.create_architecture(False)
File "/home/projects/HAKE-Action-Torch-IDN-Integrating-Decomposing-Network-/feature_extration/tools/../lib/networks/net_HO.py", line 163, in create_architecture
self.build_network(is_training)
File "/home/projects/HAKE-Action-Torch-IDN-Integrating-Decomposing-Network-/feature_extration/tools/../lib/networks/net_HO.py", line 149, in build_network
head = self.image_to_head(is_training)
File "/home/projects/HAKE-Action-Torch-IDN-Integrating-Decomposing-Network-/feature_extration/tools/../lib/networks/net_HO.py", line 89, in image_to_head
with slim.arg_scope(resnet_arg_scope(is_training=False)):
File "/home/projects/HAKE-Action-Torch-IDN-Integrating-Decomposing-Network-/feature_extration/tools/../lib/networks/net_HO.py", line 37, in resnet_arg_scope
weights_regularizer = tf.contrib.layers.l2_regularizer(cfg.TRAIN.WEIGHT_DECAY),
AttributeError: 'EasyDict' object has no attribute 'TRAIN'
I assume that you can directly modify 'cfg.TRAIN,WEIGHT_DECAY' in line37 in net_HO.py to '1e-2', since line23 in this file has the same error but has already been fixed in the latest commit by author.
Or you can choose to add '__C.TRAIN=dict()' and '__C.TRAIN.WEIGHT_DECAY=1e-2' in feature_extraction/lib/ult/config.py.
@IreneMahhy ok, thanks, it's fixed~
Thanks, we have updated the manuscript.