]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/caffe-jacinto.git/commitdiff
Update store2hdf5.m
authorAlessandro Giusti <lalelale@users.noreply.github.com>
Tue, 13 Oct 2015 12:30:45 +0000 (14:30 +0200)
committerAlessandro Giusti <lalelale@users.noreply.github.com>
Tue, 13 Oct 2015 12:30:45 +0000 (14:30 +0200)
Fixed a bug in two assertions (the condition input argument must be a scalar logical)

matlab/hdf5creation/store2hdf5.m

index 0a0016dca40925652f679900be9627cee75e9c22..4e8c81d9de886bd0e319f3f064b97bbc16215e17 100644 (file)
@@ -39,8 +39,8 @@ function [curr_dat_sz, curr_lab_sz] = store2hdf5(filename, data, labels, create,
       info=h5info(filename);
       prev_dat_sz=info.Datasets(1).Dataspace.Size;
       prev_lab_sz=info.Datasets(2).Dataspace.Size;
-      assert(prev_dat_sz(1:end-1)==dat_dims(1:end-1), 'Data dimensions must match existing dimensions in dataset');
-      assert(prev_lab_sz(1:end-1)==lab_dims(1:end-1), 'Label dimensions must match existing dimensions in dataset');
+      assert(all(prev_dat_sz(1:end-1)==dat_dims(1:end-1)), 'Data dimensions must match existing dimensions in dataset');
+      assert(all(prev_lab_sz(1:end-1)==lab_dims(1:end-1)), 'Label dimensions must match existing dimensions in dataset');
       startloc.dat=[ones(1,length(dat_dims)-1), prev_dat_sz(end)+1];
       startloc.lab=[ones(1,length(lab_dims)-1), prev_lab_sz(end)+1];
     end