custom_reducer(parent_key, child_key)
Custom reducer function for flatten_dict.flatten
Source code in wt_ml/output/utils/intermediary_tracker_utils.py
26 27 28 29 30 31 32 33 34 35 |
|
get_intermediaries_tracker(model, dataset, intermediaries_trackers, batch_intermediary_processor=None, epoch_or_step='epoch', debug=True)
Get the intermediary tracker function for the given model, dataset, and intermediary trackers. This ensures that full data model intermediaries are calculated only once for all the trackers. Each tracker is expected to have a batch processor to process batch intermediaries and a post processor to process concatenated batch results.
Source code in wt_ml/output/utils/intermediary_tracker_utils.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
intermediary_filter(intermediary)
Filter the intermediary names based on the inclusion and exclusion conditions
Source code in wt_ml/output/utils/intermediary_tracker_utils.py
73 74 75 76 77 |
|
map_layer_to_intermediary_names(inte_names)
Map the intermediary names to the layer names
Source code in wt_ml/output/utils/intermediary_tracker_utils.py
65 66 67 68 69 70 |
|
split_layer_param(name)
Split the intermediary name into layer and parameter
Source code in wt_ml/output/utils/intermediary_tracker_utils.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|