I have a Python list of dictionaries that contain information about individual layers of a neural network. Each dictionary can have any number of entries, including more dictionaries.
layer_config = [
{'conv_layer': {
'filter_size' : 5,
'stride' : 1,
'num_filters' : 20}},
{'pool_layer': {
'poolsize' : (2,2)}},
{'fc_layer': {
'num_output' : 30}},
{'final_layer': {
'num_classes' : 10}}
]
I am converting the program into C++ and need to find a way to organize this information in a similar manner. Are C++ nested maps the best way to accomplish this, or is there another data structure out there that might be a better alternative?