#在执行create_data.bat时候需要将上一次生成的文件 (train_db, val_db) 删除,不然会报错
set cmd1=C:\caffe_windows_ms_gpu\Build\x64\Release\convert_imageset.exe
set cmd2=C:\caffe_windows_ms_gpu\Build\x64\Release\compute_image_mean.exe
set minist_path=C:\caffe_windows_ms_cpu\examples\mnist\fordebug
set a=%minist_path%\train_db
set b=%minist_path%\val_db
if exist %a% (
echo deleting old train_db
rd/s/q %a%
)else (
echo train_db not exsit
)
if exist %b% (
echo deleting old val_db
rd/s/q %b%
)else (
echo val_db not exsit
)
goto start
:start
%cmd1% ^
%minist_path%\train_image\ ^
%minist_path%\train_label.txt ^
%minist_path%\train_db ^
--backend=lmdb ^
--gray=true
%cmd1% ^
%minist_path%\val_image\ ^
%minist_path%\val_label.txt ^
%minist_path%\val_db ^
--backend=lmdb ^
--gray=true
%cmd2% ^
%minist_path%\train_db ^
%minist_path%\mean.binaryproto