2 ms·
Aha! Okay, thank you. And how do you pass in the inputs differently?
by tekknolagi 3y ago
Aha! Okay, thank you. And how do you pass in the inputs differently?
- montebicyclelo 3y agoIn smallpebble it's currently done by setting the value of the Placeholders, e.g. # define some graph x = sp.Placeholder() y = sp.Lazy(sp.square)(x) # and run the graph later on x.assign_value(sp.Variable(np.array([1, 2, 3]))) y_val = y.run() # the result, y_val is an sp.Variable gradients = sp.get_gradients(y_val) # run same graph with different values x.assign_value(sp.Variable(np.array([5, 6, 7]))) y_val = y.run() gradients = sp.get_gradients(y_val) (There's some more examples of this being used in training loops in the readme.)
- tekknolagi 3y agoOh, oh, okay, these placeholders are like my `input` Values. Neat! Thank you.