textgrad.autograd.string_based_ops#
Classes
|
Autograd function for string-based functions. |
- class textgrad.autograd.string_based_ops.StringBasedFunction(fn, function_purpose)#
Bases:
Function
Autograd function for string-based functions.
- Parameters:
fn (Callable) – The function to execute for the forward pass.
function_purpose (str) – The description of the purpose of the function. Analogous to role description for variables.
- backward(response, function_purpose, inputs, backward_engine)#
- forward(inputs, response_role_description=None)#
The forward mode for string-based functions