File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
},
10
10
{
11
11
"cell_type" : " code" ,
12
- "execution_count" : null ,
12
+ "execution_count" : 2 ,
13
13
"metadata" : {},
14
14
"outputs" : [],
15
15
"source" : [
160
160
" 1. Create a tensor `D` with shape (3, 3) using the `torch.eye()` function.\n " ,
161
161
" 2. Perform the following operations and print the results:\n " ,
162
162
" 1. Multiply tensor `A` and tensor `D` using the `torch.matmul()` function.\n " ,
163
- " 2. Calculate the dot product of tensor `A` and tensor `D` using the `torch.dot()` function.\n " ,
164
- " 3. Create a tensor `E` with shape (2, 2 ) using the `torch.rand()` function.\n " ,
163
+ " 2. Calculate the matrix multiplication of tensor `A` and tensor `D` using the `torch.dot()` function.\n " ,
164
+ " 3. Create a tensor `E` with shape (2, 1 ) using the `torch.rand()` function.\n " ,
165
165
" 4. Print the size of tensor `E` and then squeeze its dimensions using the `torch.squeeze()` function. Print the size of the squeezed tensor.\n " ,
166
- " 5. Compare tensor `A` and tensor `B` element-wise using the `torch.eq()` function. Print the result."
166
+ " 5. Compare tensor `A` and tensor `B` element-wise using the `torch.eq()` function and print the result."
167
167
]
168
168
},
169
169
{
You can’t perform that action at this time.
0 commit comments