From 62910c26fc00876479eea8578511fe59b3222ee8 Mon Sep 17 00:00:00 2001 From: Spencer Buja Date: Tue, 30 Oct 2018 15:33:07 -0700 Subject: [PATCH 1/2] watch your language, sir --- source/gpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gpu.py b/source/gpu.py index 13d1ed3..ac540b4 100644 --- a/source/gpu.py +++ b/source/gpu.py @@ -65,7 +65,7 @@ def data_shipping_experiment(n:int): print(f'GPU only operations took {t1-t0}') - #let's ship data like a mofo + #let's a lot of data tensor1 = torch.FloatTensor(200, 200) tensor2 = torch.FloatTensor(200, 200) @@ -94,4 +94,4 @@ def data_shipping_experiment(n:int): # view_number(_data.train_data[10], str(_data.train_labels[10])) data_shipping_experiment(100000) - this_wont_work_dummy(_data.train_data, _data.train_labels) \ No newline at end of file + this_wont_work_dummy(_data.train_data, _data.train_labels) From 4a9557dd66ab4fe75a05f34f22a394613376322b Mon Sep 17 00:00:00 2001 From: Spencer Buja Date: Wed, 31 Oct 2018 11:25:54 -0700 Subject: [PATCH 2/2] RunTime Error calling matmul AttributeError: 'numpy.ndarray' object has no attribute 'matmul'. Change this to the "dot" function. --- source/gpu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gpu.py b/source/gpu.py index ac540b4..4837c3f 100644 --- a/source/gpu.py +++ b/source/gpu.py @@ -45,7 +45,7 @@ def data_shipping_experiment(n:int): array2 = np.random.randn(200,200) t0 = time.time() for i in range(n): - array3 = array1.matmul(array2) + array3 = array1.dot(array2) array1 = array3 t1 = time.time()