hdf5

H5PY - How to store many 2D arrays of different dimensions

余生长醉 提交于 2019-12-12 03:58:10
问题 I would like to organize my collected data (from computer simulations) into a hdf5 file using Python. I measured positions and velocities [x,y,z,vx,vy,vz] of all atoms within a certain space region over many time steps. The number of atoms, of course, varies from time step to time step. A minimal example could look as follows: [ [ [x1,y1,z1,vx1,vy1,vz1], [x2,y2,z2,vx2,vy2,vz2] ], [ [x1,y1,z1,vx1,vy1,vz1], [x2,y2,z2,vx2,vy2,vz2], [x3,y3,z3,vx3,vy3,vz3] ] ] (2 time steps, first time step: 2

Is it possible to update dataset dimensions in hdf5 file using rhdf5 in R?

妖精的绣舞 提交于 2019-12-11 21:13:48
问题 I am trying to update 7 datasets within 1 group in an hdf5 file, but the updated datasets have different size dimensions than the originals (but the same dimensionality, ie 1D, 2D, and 3D). Is there a way to alter the dimension property in order to update the dataset? Alternatively, can I delete the previous group, and then create a new group in it's place? I'd rather not rebuild the entire h5 file (create file, create groups, create datasets) since it's decently complex. I am using the

PyTables - big memory consumption using cols method

时光总嘲笑我的痴心妄想 提交于 2019-12-11 18:48:28
问题 What is the purpose for using cols method in Pytables? I have got big dataset and I am interested in reading only one column from that dataset. These two methods gives me same time, but totally different variable memory consumption: import tables from sys import getsizeof f = tables.open_file(myhdf5_path, 'r') # These two methods takes the same amount of time x = f.root.set1[:500000]['param1'] y = f.root.set1.cols.param1[:500000] # But totally different memory consumption: print(getsizeof(x))

Caffe - Doing forward pass with multiple input blobs

╄→гoц情女王★ 提交于 2019-12-11 18:37:56
问题 Following are the input layers of my fine-tuned model: layer { type: "HDF5Data" name: "data" top: "Meta" hdf5_data_param { source: "/path/to/train.txt" batch_size: 50 } include { phase: TRAIN } } layer { name: "data" type: "ImageData" top: "X" top: "Labels" include { phase: TRAIN } transform_param { mirror: true crop_size: 227 mean_file: "data/ilsvrc12/imagenet_mean.binaryproto" } image_data_param { source: "/path/to/train.txt" batch_size: 50 new_height: 256 new_width: 256 } } layer { type:

How to compress the data that saved in hdf5?

ぐ巨炮叔叔 提交于 2019-12-11 17:56:39
问题 I am using python 2.7 to read a video and store in hdf5. This is my code import h5py import skvideo.datasets import skvideo.io videodata = skvideo.io.vread('./v_ApplyEyeMakeup_g01_c01.avi') with h5py.File('./video.hdf5','w') as f: f['data'] = videodata f['label'] = 1 The problem is that the output hdf5 is too larger. It is 128 times larger than the original avi file. What should I do to compress/reduce the size? You can download the file at https://drive.google.com/open?id

How to create variable length columns in hdf5 file?

倖福魔咒の 提交于 2019-12-11 17:09:00
问题 I am using h5py package to create HDF5 file for my training set. I want to create the first column having a variable length. For example, [1,2,3] as 1st entry in the column, [1,2,3,4,5] as 2nd entry and so on leaving other 5 columns in the same dataset in HDF5 file with data type int with a fixed length, i.e. 1. I have tried the below code statement to solve this type of scenario: dt = h5py.special_dtype(vlen=np.dtype('int32')) datatype = np.dtype([('FieldA', dt), ('FieldB', dt1), ('FieldC',

hdf5.h no such file or directory under Ubuntu and CMake

梦想与她 提交于 2019-12-11 16:54:59
问题 I have already installed HDF5 under Ubuntu : sudo apt install libhdf5-dev I have a Qt program using HDF5 that compiles fine under CentOS 7 but not under Ubuntu : erreur : hdf5.h: No such file or directory #include ^~~~~~~~ I am using CMake to generate the build files and in it, I didn't need to handle HDF5 for the CentOS build. I added this part that I found on the web to the CMake script but I still have a compile error. FIND_PACKAGE(ZLIB) FIND_LIBRARY(HDF5_LIBRARY hdf5 ...) FIND_LIBRARY

yum install complains about already installed dependency

半城伤御伤魂 提交于 2019-12-11 15:32:43
问题 I mean to install a package that is apparently not available in my registered repos (see RedHat, which package provides hdf5.h). So I downloaded hdf5-openmpi-devel-1.8.5.patch1-10.el6.i686.rpm from rpmfind.net , and tried installing from file, obtaining complaints about some missing files (see (1) below). But those files exist in my system (see (2) below). How can I work around this issue to get a functional system? This seems to deal with a related but different issue. Test #1: # yum install

Error when trying to save hdf5 row where one column is a string and the other is an array of floats

只谈情不闲聊 提交于 2019-12-11 15:10:10
问题 I have two column, one is a string, and the other is a numpy array of floats a = 'this is string' b = np.array([-2.355, 1.957, 1.266, -6.913]) I would like to store them in a row as separate columns in a hdf5 file. For that I am using pandas hdf_key = 'hdf_key' store5 = pd.HDFStore('file.h5') z = pd.DataFrame( { 'string': [a], 'array': [b] }) store5.append(hdf_key, z, index=False) store5.close() However, I get this error TypeError: Cannot serialize the column [array] because its data contents

Check fail: how to use hdf5 data layer in deep layer?

天涯浪子 提交于 2019-12-11 13:24:17
问题 I have the train and label data as data.mat . (I have 200 training data with 6000 features and labels are (-1, +1) that have saved in data.mat). I am trying to convert my data (train and test) in hdf5 and run Caffe using: load input.mat hdf5write('my_data.h5', '/new_train_x', single( permute(reshape(new_train_x,[200, 6000, 1, 1]),[4:-1:1] ) )); hdf5write('my_data.h5', '/label_train', single( permute(reshape(label_train,[200, 1, 1, 1]), [4:-1:1] ) ) , 'WriteMode', 'append' ); hdf5write('my