记录动作以及回放record_demo,replay_demo
This commit is contained in:
24
check_hdf5.py
Normal file
24
check_hdf5.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import h5py
|
||||
|
||||
file_path = "/home/maic/LYT/mindbot/datasets/mindrobot_demos.hdf5"
|
||||
|
||||
with h5py.File(file_path, "r") as f:
|
||||
print("文件结构:")
|
||||
|
||||
def print_structure(name, obj):
|
||||
print(name)
|
||||
|
||||
f.visititems(print_structure)
|
||||
|
||||
print("\n开始打印前 50 条数据:\n")
|
||||
|
||||
def print_first_50(name, obj):
|
||||
if isinstance(obj, h5py.Dataset):
|
||||
print(f"\nDataset: {name}")
|
||||
print("Shape:", obj.shape)
|
||||
|
||||
# 只打印前 50 条
|
||||
data = obj[:50]
|
||||
print(data)
|
||||
|
||||
f.visititems(print_first_)
|
||||
Reference in New Issue
Block a user