You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/problems/CPU/LeNet_MNIST.jl
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,8 @@ fig = plot(
47
47
48
48
println("Training SGD with KNET")
49
49
# Train Knet
50
-
trained_model_knet =train_knet(knetModel, xtrn, ytrn, xtst, ytst;mbatch=m, mepoch = max_epochs) #TODO some reason when mepoch=max_epochs, will give error , maybe Int(max_epochs)
50
+
trained_model_knet =
51
+
train_knet(knetModel, xtrn, ytrn, xtst, ytst; mbatch = m, mepoch = max_epochs) #TODO some reason when mepoch=max_epochs, will give error , maybe Int(max_epochs)
Copy file name to clipboardExpand all lines: src/problems/GPU/LeNet_MNIST.jl
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
2
2
T = Float32
3
3
# Knet.atype() = Array{T}
4
-
if CUDA.functional()
4
+
if CUDA.functional()
5
5
Knet.array_type[] = CUDA.CuArray{T}
6
-
else
6
+
else
7
7
Knet.array_type[] = Array{T}
8
8
end
9
9
@@ -45,7 +45,8 @@ train_acc = res.train_acc_arr
45
45
46
46
println("Training SGD with KNET")
47
47
# Train Knet
48
-
trained_model_knet =train_knet(knetModel, xtrn, ytrn, xtst, ytst;mbatch=m, mepoch = max_epochs) #TODO some reason when mepoch=max_epochs, will give error , maybe Int(max_epochs)
48
+
trained_model_knet =
49
+
train_knet(knetModel, xtrn, ytrn, xtst, ytst; mbatch = m, mepoch = max_epochs) #TODO some reason when mepoch=max_epochs, will give error , maybe Int(max_epochs)
0 commit comments