From eebcfca6ca947734dbda764f69aebcce0fae2b95 Mon Sep 17 00:00:00 2001 From: Patrick Flick Date: Thu, 19 Jul 2018 11:21:02 -0700 Subject: [PATCH] Randomly initialize AlexNet input partially addresses issue #8 --- alexnet.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/alexnet.cpp b/alexnet.cpp index 2170aad..cf3aac6 100644 --- a/alexnet.cpp +++ b/alexnet.cpp @@ -5,15 +5,7 @@ #include "multi_layers.hpp" -/* TODO: - * - [ ] create AlexNet class - * - [ ] uniform random tensors (via host->device copy), and CPU initialized tensors - * - [x] Make `Model` take input and output tensors in forward(), backward() - * - [ ] Collect total and average times per layer - * - [ ] implement and benchmark ResNet - */ - - +// implemenets AlexNet void alexNet() { TensorDesc input_dim(128, 3, 224, 224); @@ -49,6 +41,7 @@ void alexNet() { Model m(input_dim); m.add(features); m.add(classifier); + m.input.uniform(); // randomly initialize input BenchmarkLogger::new_session("alex_net"); BenchmarkLogger::benchmark(m, 50);