Skip to content

Commit f4b63c1

Browse files
noahschuetzJaviermateorJonahBalshai
authored
Resnet MNIST Testing (#11)
Co-authored-by: Mateo-M3 <[email protected]> Co-authored-by: Jonah Balshai <[email protected]>
1 parent 10a181b commit f4b63c1

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,3 @@ nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
162162
nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb.1
163163
index.html
164164
imagenet_data/
165-

scripts/nn/networks/alexnet.dml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ init = function(int C, int Hin, int Win, int num_classes, int seed)
358358
* Outputs:
359359
* - model: List of initialized model parameters
360360
*/
361-
361+
362362
# Calculate fully connected input size based on actual input dimensions
363363
fc_input_size = calculate_conv_output_size(Hin, Win)
364364

@@ -539,7 +539,7 @@ compute_loss = function(matrix[double] predictions, matrix[double] targets, list
539539
reg_loss = 0
540540
for (i in seq(1, length(model), 2)) { # Only weights, skip biases
541541
W = as.matrix(model[i])
542-
reg_loss = reg_loss + l2_reg::forward(W, 1)
542+
reg_loss = reg_loss + l2_reg::forward(W, 1)
543543
}
544544
loss = data_loss + weight_decay * reg_loss
545545
}
@@ -1131,6 +1131,7 @@ backward_with_bn = function(matrix[double] dOut, list[unknown] cached_out,
11311131
dW5, db5, dgamma5, dbeta5, matrix(0, rows=nrow(dgamma5), cols=ncol(dgamma5)), matrix(0, rows=nrow(dgamma5), cols=ncol(dgamma5)),
11321132
dW6, db6, dW7, db7, dW8, db8)
11331133
}
1134+
11341135
evaluate_with_bn = function(matrix[double] X, matrix[double] Y, int C, int Hin, int Win,
11351136
list[unknown] model, int batch_size)
11361137
return (double loss, double accuracy) {

scripts/nn/optim/lars.dml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ update = function(matrix[double] X, matrix[double] dX, double lr, double mu,
5252
* - v: Updated velocity, of same shape as input v.
5353
*/
5454

55-
5655
# Step 1: Add weight decay to the gradient to form g'.
5756
# This corresponds to `g_t' + βw_t'` in Algorithm 1.
5857
dX_wd = dX + lambda * X;

0 commit comments

Comments
 (0)