Skip to content
Snippets Groups Projects
Commit 4fd818b0 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 68685d42
No related branches found
No related tags found
No related merge requests found
......@@ -1190,13 +1190,16 @@ def run_average_models(ckpt_dir_s_path, day_night='NIGHT', l1b_andor_l2='BOTH',
model_weight_s.append(k_model.get_weights())
print('done loading models ******************************************')
num_model_lyrs = len(model_weight_s[0])
model_lyrs = [[] for k in range(num_model_lyrs)]
avg_model_weights = []
for m in model_weight_s:
print(len(m))
for w in m:
print(w.shape)
# avg_model_weights.append(np.mean(w))
print('--------------------------------------')
for k, w in enumerate(m):
model_lyrs[k].append(w)
for lyr in model_lyrs:
nda = np.stack(lyr)
avg_model_weights.append(nda)
# -- Make a new model for the averaged weights
new_model = IcingIntensityFCN(day_night=day_night, l1b_or_l2=l1b_andor_l2, use_flight_altitude=use_flight_altitude)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment