Skip to content

Commit

Permalink
Merge pull request karpathy#35 from cbovar/Fix-mnist-example
Browse files Browse the repository at this point in the history
Use image_channels when filling volume
  • Loading branch information
karpathy committed Jun 2, 2015
2 parents 72b4719 + 9c9f886 commit 9b8a20a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions demo/js/images-demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var sample_training_instance = function() {
var x = new convnetjs.Vol(image_dimension,image_dimension,image_channels,0.0);
var W = image_dimension*image_dimension;
var j=0;
for(var dc=0;dc<3;dc++) {
for(var dc=0;dc<image_channels;dc++) {
var i=0;
for(var xc=0;xc<image_dimension;xc++) {
for(var yc=0;yc<image_dimension;yc++) {
Expand Down Expand Up @@ -57,7 +57,7 @@ var sample_test_instance = function() {
var x = new convnetjs.Vol(image_dimension,image_dimension,image_channels,0.0);
var W = image_dimension*image_dimension;
var j=0;
for(var dc=0;dc<3;dc++) {
for(var dc=0;dc<image_channels;dc++) {
var i=0;
for(var xc=0;xc<image_dimension;xc++) {
for(var yc=0;yc<image_dimension;yc++) {
Expand Down Expand Up @@ -648,4 +648,4 @@ var load_pretrained = function() {
var change_net = function() {
eval($("#newnet").val());
reset_all();
}
}

0 comments on commit 9b8a20a

Please sign in to comment.