Skip to content

Taking a gradient of a parameter input into index_update #6091

Answered by davisyoshida
sunilkpai asked this question in Q&A
Discussion options

You must be logged in to vote

The line y.at[2:8].set(x) currently has no effect. Presumably you want:

z = y.at[2:8].set(x)
return z[:5].sum()
Shouldn't the desired sum be 4, not 10 though? Unless I'm misreading the intent.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sunilkpai
Comment options

Answer selected by sunilkpai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants