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
Unfortunately, there's an oversight in my implementation of the operator overloads that involve scalars. They only seem to currently work for integer scalars (only integer scalars are considered in the autograd demo).
For example, changing the divisor with
diff --git a/examples/6_Autograd/autograd.f90 b/examples/6_Autograd/autograd.f90
index cf60494..9d73853 100644
--- a/examples/6_Autograd/autograd.f90+++ b/examples/6_Autograd/autograd.f90@@ -52,7 +52,7 @@ program example
! Check arithmetic operations work for torch_tensors
write (*,*) "a = ", in_data1(:,1)
write (*,*) "b = ", in_data2(:,1)
- Q = 3 * (a**3 - b * b / 3)+ Q = 3 * (a**3 - b * b / 3.0)
! Extract a Fortran array from a Torch tensor
call torch_tensor_to_array(Q, out_data, shape(in_data1))
on the main branch results in the test failure:
test 2 Start 2: fautograd2: Test command: /home/joe/software/FTorch/src/build/test/examples/6_Autograd/autograd2: Test timeout computed to be: 15002: a = 2.00000000 3.00000000 2: b = 6.00000000 4.00000000 2: Q = 3 * (a ** 3 - b * b / 2) = 24.0000000 81.0000000 2: FAILED :: [torch_tensor_to_array] relative tolerance = 0.1000E-042: Error :: out_data does not match expected value2: STOP 9992/2 Test #2: fautograd ........................***Failed Required regular expression not found. Regex=[Autograd example ran successfully] 0.23 sec
The text was updated successfully, but these errors were encountered:
Unfortunately, there's an oversight in my implementation of the operator overloads that involve scalars. They only seem to currently work for integer scalars (only integer scalars are considered in the autograd demo).
For example, changing the divisor with
on the
main
branch results in the test failure:The text was updated successfully, but these errors were encountered: