Skip to content

Commit

Permalink
Merge pull request #80 from OliverObst/matlab-fix
Browse files Browse the repository at this point in the history
fixed a small bug for Matlab calling undefined OCTAVE_VERSION for conv n...
  • Loading branch information
rasmusbergpalm committed Jan 12, 2014
2 parents 828d709 + 7c23709 commit c083531
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CNN/cnnsetup.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function net = cnnsetup(net, x, y)
assert(~isOctave() || compare_versions(OCTAVE_VERSION, '3.8.0', '>='), ['Octave 3.8.0 or greater is required for CNNs as there is a bug in convolution in previous versions. See http://savannah.gnu.org/bugs/?39314. Your version is ' OCTAVE_VERSION]);
assert(~isOctave() || compare_versions(OCTAVE_VERSION, '3.8.0', '>='), ['Octave 3.8.0 or greater is required for CNNs as there is a bug in convolution in previous versions. See http://savannah.gnu.org/bugs/?39314. Your version is ' myOctaveVersion]);
inputmaps = 1;
mapsize = size(squeeze(x(:, :, 1)));

Expand Down
7 changes: 7 additions & 0 deletions util/myOctaveVersion.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
% return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end

0 comments on commit c083531

Please sign in to comment.