From ed5ea66b91dc163548df041ea000c7191e7b3b9e Mon Sep 17 00:00:00 2001 From: Jaseemck Date: Mon, 8 Jun 2020 07:58:39 +0530 Subject: [PATCH 1/3] Added subtask --- Tasks/daily tasks/Jaseem ck/Task_1.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Tasks/daily tasks/Jaseem ck/Task_1.py diff --git a/Tasks/daily tasks/Jaseem ck/Task_1.py b/Tasks/daily tasks/Jaseem ck/Task_1.py new file mode 100644 index 0000000..7f0e599 --- /dev/null +++ b/Tasks/daily tasks/Jaseem ck/Task_1.py @@ -0,0 +1,16 @@ +import torch as th +import numpy as np + +#numpy of size 5*3 +a = np.arange(15).reshape(5,3) +#numpy of size 3*4 +b = np.arange(12).reshape(3,4) + +#Converting numpy arrays into tensors +a_torch = th.from_numpy(a) +b_torch = th.from_numpy(b) + +#Multiply the tensors to generate the product +product = th.mm(a_torch, b_torch) + +print(product) From 68098d2679654440470ebc1e067f86173eb0c839 Mon Sep 17 00:00:00 2001 From: Jaseemck Date: Mon, 8 Jun 2020 12:48:10 +0530 Subject: [PATCH 2/3] Back --- Tasks/daily tasks/Jaseem ck/Task_1.py | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 Tasks/daily tasks/Jaseem ck/Task_1.py diff --git a/Tasks/daily tasks/Jaseem ck/Task_1.py b/Tasks/daily tasks/Jaseem ck/Task_1.py deleted file mode 100644 index 7f0e599..0000000 --- a/Tasks/daily tasks/Jaseem ck/Task_1.py +++ /dev/null @@ -1,16 +0,0 @@ -import torch as th -import numpy as np - -#numpy of size 5*3 -a = np.arange(15).reshape(5,3) -#numpy of size 3*4 -b = np.arange(12).reshape(3,4) - -#Converting numpy arrays into tensors -a_torch = th.from_numpy(a) -b_torch = th.from_numpy(b) - -#Multiply the tensors to generate the product -product = th.mm(a_torch, b_torch) - -print(product) From fc998edbea651c9ebcfbbe8ea6cec1a65f5694f6 Mon Sep 17 00:00:00 2001 From: Jaseemck Date: Mon, 8 Jun 2020 12:53:04 +0530 Subject: [PATCH 3/3] Added first task --- Tasks/daily tasks/Jaseem ck/Task_1.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Tasks/daily tasks/Jaseem ck/Task_1.py diff --git a/Tasks/daily tasks/Jaseem ck/Task_1.py b/Tasks/daily tasks/Jaseem ck/Task_1.py new file mode 100644 index 0000000..7f0e599 --- /dev/null +++ b/Tasks/daily tasks/Jaseem ck/Task_1.py @@ -0,0 +1,16 @@ +import torch as th +import numpy as np + +#numpy of size 5*3 +a = np.arange(15).reshape(5,3) +#numpy of size 3*4 +b = np.arange(12).reshape(3,4) + +#Converting numpy arrays into tensors +a_torch = th.from_numpy(a) +b_torch = th.from_numpy(b) + +#Multiply the tensors to generate the product +product = th.mm(a_torch, b_torch) + +print(product)