File size: 714 Bytes
cedeb82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import h5py

def print_model_details(file_path):
    with h5py.File(file_path, 'r') as f:
        print(f.keys())  # Print layers
        print(len(f.keys())) 
        print("")
        for key in f.keys():
            print(len(list(f[key].keys())))
            print(f"{key}: {list(f[key].keys())}")  # Print details of each layer)
print('rock')
print_model_details('model_classification/rock-170.h5')
print('mummified-170')
print_model_details('model_classification/mummified-170.h5')
print('BEiT')
print_model_details('model_classification/fossil-142.h5')
print('BEiT New')
print_model_details('model_classification/fossil-new.h5')
print("Newest:")
print_model_details('model_classification/fossil-model.h5')