fossil_app / check_arch.py
andy-wyx's picture
add compare esnet moodel
cedeb82
raw
history blame
714 Bytes
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')