Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lucid/misc/gradient_override.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def register_to_random_name(grad_f):
Returns:
String that gradient function was registered to.
"""
grad_f_name = grad_f.__name__ + "_" + hex(np.random.randint(0, 1e10))[2:]
grad_f_name = grad_f.__name__ + "_" + hex(np.random.randint(low=0, high=1e10, dtype='int64'))[2:]
tf.RegisterGradient(grad_f_name)(grad_f)
return grad_f_name

Expand Down