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
Tested this on a fresh conda environment with just neuralforge installed (and its dependencies) and it generates some errors:
importneuralforgeasforge# Instantiate Tensors:x=forge.randn((8,4,5))
w=forge.randn((8,5,4), requires_grad=True)
b=forge.randint((4), requires_grad=True)
# Make calculations:out=x @ wout+=b# Compute gradients on whole graph:out.backward()
# Get gradients from specific Tensors:print(w.grad)
print(b.grad)
Traceback (most recent call last):
File "/Users/.../autograd_np.py", line 14, in <module>
out.backward()
File "/opt/miniconda3/envs/.../neuralforge/tensor_operations.py", line 49, in backward
self.operation.backward(self.grad, self)
File "/opt/miniconda3/envs/.../neuralforge/tensor_operations.py", line 273, in backward
b.backward(db, z)
File "/opt/miniconda3/envs/.../neuralforge/tensor_operations.py", line 42, in backward
self.grad += grad
numpy.core._exceptions._UFuncOutputCastingError: Cannot cast ufunc 'add' output from dtype('float64') to dtype('int64') with casting rule 'same_kind'
Not entirely sure how to fix this as it seems like a neuralforge issue and not a my-code issue. I even tried changing the dtype of b._data to float64 (b._data = b._data.astype("float64")) and it still generates the same errors
The text was updated successfully, but these errors were encountered:
Tested this on a fresh conda environment with just neuralforge installed (and its dependencies) and it generates some errors:
Not entirely sure how to fix this as it seems like a neuralforge issue and not a my-code issue. I even tried changing the dtype of b._data to float64 (
b._data = b._data.astype("float64")
) and it still generates the same errorsThe text was updated successfully, but these errors were encountered: