Clarification questions #684
Unanswered
infinite-pursuits
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have 2 clarification questions
type CubicCircuit struct {
X frontend.Variable
gnark:"x"
Y frontend.Variable
gnark:",public"
}
I assume that I can't assign floats to X or Y? Instead of CubicCircuit{X: 3, Y: 35} I can't do CubicCircuit{X: 3.4, Y: 35.2} ?Currently getting this error when I assign floats "can’t set fr.Element from type float64".
What is the usual way to get around this in that case?
type VerifyCircuit struct {
W [][][]frontend.Variable
gnark:"W"
B [][]frontend.Variable
gnark:"B"
Cx []frontend.Variable
gnark:",public"
Chidden_layer_size []frontend.Variable
gnark:"Chidden_layer_size"
Actcodearray [][]frontend.Variable
gnark:",public"
}
Here the size of all the slices are to be supplied by a json. I tried assigning []frontend.Variables to these variables. But when I do any operation on a value like Cx[1] I get a runtime error: index out of range. Is it necessary to put the size in the struct definition?
If not, then how do I deal with the error?
Beta Was this translation helpful? Give feedback.
All reactions