Skip to content

Commit e94065e

Browse files
committed
show Caffe's version from MatCaffe
1 parent 19ee69d commit e94065e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

matlab/+caffe/private/caffe_.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,13 @@ static void write_mean(MEX_ARGS) {
504504
mxFree(mean_proto_file);
505505
}
506506

507+
// Usage: caffe_('version')
508+
static void version(MEX_ARGS) {
509+
mxCHECK(nrhs == 0, "Usage: caffe_('version')");
510+
// Return version string
511+
plhs[0] = mxCreateString(AS_STRING(CAFFE_VERSION));
512+
}
513+
507514
/** -----------------------------------------------------------------
508515
** Available commands.
509516
**/
@@ -542,6 +549,7 @@ static handler_registry handlers[] = {
542549
{ "reset", reset },
543550
{ "read_mean", read_mean },
544551
{ "write_mean", write_mean },
552+
{ "version", version },
545553
// The end.
546554
{ "END", NULL },
547555
};

matlab/+caffe/version.m

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function version_str = version()
2+
% version()
3+
% show Caffe's version.
4+
5+
version_str = caffe_('version');
6+
7+
end

0 commit comments

Comments
 (0)