^aI      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      None ,-FQSTV]T n a is a list of a s repeated n times.:kind! Replicate N3 Int'[Int, Int, Int]:kind! Replicate N5 Double)'[Double, Double, Double, Double, Double]  !"#(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone &'7<ST]cd (Helper class for automatically deriving  using GHC Generics.(Helper class for automatically deriving  using GHC Generics.(Helper class for automatically deriving  using GHC Generics.6Class of values that can be backpropagated in general.For instances of $ , these methods can be given by , , and ,. There are also generic options given in Numeric.Backprop.Class for functors, % instances, and & instances.  instance  ' where  =   =   =  If you leave the body of an instance declaration blank, GHC Generics will be used to derive instances if the type has a single constructor and each field is an instance of .KTo ensure that backpropagation works in a sound way, should obey the laws: identity  x ( y) = x  ( x) y = y1Also implies preservation of information, making ( ())2 an illegal implementation for lists and vectors.CThis is only expected to be true up to potential "extra zeroes" in x and y in the result.  commutativity  x y =  y x  associativity  x ( y z) =  ( x y) z  idempotence  *  =   *  = sNote that not all values in the backpropagation process needs all of these methods: Only the "final result" needs , for example. These are all grouped under one typeclass for convenience in defining instances, and also to talk about sensible laws. For fine-grained control, use the "explicit" versions of library functions (for example, in Numeric.Backprop.Explicit ) instead of  based ones.(This typeclass replaces the reliance on $ of the previous API (v0.1). $ is strictly more powerful than h, and is a stronger constraint on types than is necessary for proper backpropagating. In particular, +k is a problem for many types, preventing useful backpropagation for lists, variable-length vectors (like  Data.VectorA) and variable-size matrices from linear algebra libraries like hmatrix and  accelerate.O"Zero out" all components of a value. For scalar values, this should just be , 0\. For vectors and matrices, this should set all components to zero, the additive identity.Should be idempotent:  *  =  Should be as lazyU as possible. This behavior is observed for all instances provided by this library.See - for a pre-built definition for instances of $ and !# for a definition for instances of -). If left blank, will automatically be +, a pre-built definition for instances of   / whose fields are all themselves instances of .pAdd together two values of a type. To combine contributions of gradients, so should be information-preserving:  x ( y) = x  ( x) y = y Should be as strictU as possible. This behavior is observed for all instances provided by this library.See - for a pre-built definition for instances of $ and  addFunctor# for a definition for instances of -). If left blank, will automatically be +, a pre-built definition for instances of   D with one constructor whose fields are all themselves instances of .OneE all components of a value. For scalar values, this should just be , 1a. For vectors and matrices, this should set all components to one, the multiplicative identity.Should be idempotent:  *  =  Should be as lazyU as possible. This behavior is observed for all instances provided by this library.See - for a pre-built definition for instances of $ and $# for a definition for instances of -). If left blank, will automatically be +, a pre-built definition for instances of   / whose fields are all themselves instances of .; using GHC Generics; works if all fields are instances of .; using GHC Generics; works if all fields are instances of /, but only for values with single constructors.: using GHC Generics; works if all fields are instaces of . for instances of $.Is lazy in its argument. for instances of $. for instances of $.Is lazy in its argument. for instances of .. for instances of .A. Automatically pads the end of the shorter vector with zeroes.  for instances of ..! for - instances." for instances of %B. Automatically pads the end of the "shorter" value with zeroes.#i for types that are isomorphic to a list. Automatically pads the end of the "shorter" value with zeroes.$ for instances of -.8 and ! replace all current values, and G merges keys from both maps, adding in the case of double-occurrences.9 and ! replace all current values, and G merges keys from both maps, adding in the case of double-occurrences.; is strict, but  and  are lazy in their arguments.> is strict? is strict@ is strictA is strictB is strict, but  and  are lazy in their arguments.C/ is treated the same as 0 0 . However, , , and  preserve / if all inputs are also /.Dg assumes the shorter sequence has trailing zeroes, and the result has the length of the longest input.Ec assumes the shorter list has trailing zeroes, and the result has the length of the longest input.Fc assumes the shorter list has trailing zeroes, and the result has the length of the longest input.#)convert to list (should form isomorphism)+convert from list (should form isomorphism) !"#$ !"#$(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone &'-<QV]dh61.Helper wrapper used for the implementation of X.TAn T as a* describes a differentiable function from as to a.For example, a value of type T '[Int, Bool] Double is a function from an 2 and a 3, returning a ''. It can be differentiated to give a gradient of an 2 and a 3& if given a total derivative for the Double. If we call 3 2), then, mathematically, it is akin to a:2 f : \mathbb{Z} \times 2 \rightarrow \mathbb{R} See ], _, and ^% for examples on how to run it, and T! for instructions on creating it.NIt is simpler to not use this type constructor directly, and instead use the n, m, n, and o helper smart constructors.See Numeric.Backprop.Op#prod for a mini-tutorial on using  and  .To use an T with the backprop library, see liftOp, liftOp1, liftOp2, and liftOp3.U Construct an T by giving a function creating the result, and also a continuation on how to create the gradient, given the total derivative of a.!See the module documentation for Numeric.Backprop.Op= for more details on the function that this constructor and T expect.VRun the function that the T\ encodes, returning a continuation to compute the gradient, given the total derivative of a. See documentation for Numeric.Backprop.Op for more information.W A version of X taking explicit 4<, indicating the number of inputs expected and their types.Requiring an explicit 4 is mostly useful for rare "extremely polymorphic" situations, where GHC can't infer the type and length of the the expected input tuple. If you ever actually explicitly write down as5 as a list of types, you should be able to just use X.XCompose Ts together, like 5 for functions, or liftAN.That is, given an T as b1, an T as b2 , and an T as b3, it can compose them with an T '[b1,b2,b3] c to create an T as c.Y A version of Z taking explicit 4<, indicating the number of inputs expected and their types.Requiring an explicit 4 is mostly useful for rare "extremely polymorphic" situations, where GHC can't infer the type and length of the the expected input tuple. If you ever actually explicitly write down as5 as a list of types, you should be able to just use Z.ZConvenient wrapper over XJ for the case where the second function only takes one input, so the two T,s can be directly piped together, like for *.['Convenient infix synonym for (flipped) Z. Meant to be used just like *: f :: T '[b] c g :: T '[a,a] b f [ g :: Op '[a, a] c \Run the function that an T encodes, to get the result.runOp (op2 (*)) (3 ::< 5 ::< )15]Run the function that an TX encodes, to get the resulting output and also its gradient with respect to the inputs.!gradOp' (op2 (*)) (3 ::< 5 ::< )(15, 5 ::< 3 ::< )^"Get the gradient function that an TN encodes, with a third argument expecting the total derivative of the result.!See the module documentaiton for Numeric.Backprop.Op for more information._Run the function that an TI encodes, and get the gradient of the output with respect to the inputs. gradOp (op2 (*)) (3 ::< 5 ::< ) 5 ::< 3 ::< -- the gradient of x*y is (y, x) _ o xs = ^ o xs 1 `An TX that coerces an item into another item whose type has the same runtime representation.4gradOp' opCoerce (Identity 5) :: (Int, Identity Int)(5, Identity 1) ` = e coerced 6 a Create an T* with no gradient. Can be evaluated with \C, but will throw a runtime exception when asked for the gradient.Can be used with BVar with liftOp1, and evalBP will work fine. gradBP and backprop will also work fine if the result is never used in the final answer, but will throw a runtime exception if the final answer depends on the result of this operation.+Useful if your only API is exposed through backprop. Just be sure to tell your users that this will explode when finding the gradient if the result is used in the final result.b Create an T* with no gradient. Can be evaluated with \C, but will throw a runtime exception when asked for the gradient.Can be used with BVar with liftOp, and evalBP will work fine. gradBP and backprop will also work fine if the result is never used in the final answer, but will throw a runtime exception if the final answer depends on the result of this operation.+Useful if your only API is exposed through backprop. Just be sure to tell your users that this will explode when finding the gradient if the result is used in the final result.cAn TA that just returns whatever it receives. The identity function. c = e 7 7 dAn T that takes as% and returns exactly the input tuple.#gradOp' opTup (1 ::< 2 ::< 3 ::< )*(1 ::< 2 ::< 3 ::< , 1 ::< 1 ::< 1 ::< )eAn T2 that runs the input value through an isomorphism.xWarning: This is unsafe! It assumes that the isomorphisms themselves have derivative 1, so will break for things like 8 & 9<. Basically, don't use this for any "numeric" isomorphisms.fAn Td that runs the two input values through an isomorphism. Useful for things like constructors. See e for caveats.gAn Te that runs the three input values through an isomorphism. Useful for things like constructors. See e for caveats.hAn T_ that runs the input value through an isomorphism between a tuple of values and a value. See e for caveats.In Numeric.Backprop.Op0 since version 0.1.2.0, but only exported from Numeric.Backprop since version 0.1.3.0.iAn T3 that extracts a value from an input value using a :.Warning: This is unsafe! It assumes that it extracts a specific value unchanged, with derivative 1, so will break for things that numerically manipulate things before returning them.j A version of k taking explicit 43, indicating the number of inputs and their types.Requiring an explicit 4 is mostly useful for rare "extremely polymorphic" situations, where GHC can't infer the type and length of the the expected input tuple. If you ever actually explicitly write down as5 as a list of types, you should be able to just use k.kAn TD that ignores all of its inputs and returns a given constant value.*gradOp' (opConst 10) (1 ::< 2 ::< 3 ::< )(10, 0 ::< 0 ::< 0 ::< )l Create an T: that takes no inputs and always returns the given value.'There is no gradient, of course (using _Q will give you an empty tuple), because there is no input to have a gradient of.runOp (op0 10) (10, )For a constant T& that takes input and ignores it, see k and j.m Create an T of a function taking one input, by giving its explicit derivative. The function should return a tuple containing the result of the function, and also a function taking the derivative of the result and return the derivative of the input. If we haveT \eqalign{ f &: \mathbb{R} \rightarrow \mathbb{R}\cr y &= f(x)\cr z &= g(y) } Then the derivative  \frac{dz}{dx} , it would be:/ \frac{dz}{dx} = \frac{dz}{dy} \frac{dy}{dx} If our T represents fO, then the second item in the resulting tuple should be a function that takes  \frac{dz}{dy} and returns  \frac{dz}{dx}.As an example, here is an T that squares its input: square :: Num a => T '[a] a square = m6 $ \x -> (x*x, \d -> 2 * d * x ) ARemember that, generally, end users shouldn't directly construct TDs; they should be provided by libraries or generated automatically.n Create an T of a function taking two inputs, by giving its explicit gradient. The function should return a tuple containing the result of the function, and also a function taking the derivative of the result and return the derivative of the input. If we haveY \eqalign{ f &: \mathbb{R}^2 \rightarrow \mathbb{R}\cr z &= f(x, y)\cr k &= g(z) } Then the gradient M \left< \frac{\partial k}{\partial x}, \frac{\partial k}{\partial y} \right>  would be: \left< \frac{\partial k}{\partial x}, \frac{\partial k}{\partial y} \right> = \left< \frac{dk}{dz} \frac{\partial z}{dx}, \frac{dk}{dz} \frac{\partial z}{dy} \right> If our T represents fO, then the second item in the resulting tuple should be a function that takes  \frac{dk}{dz} and returns = \left< \frac{\partial k}{dx}, \frac{\partial k}{dx} \right> .As an example, here is an T that multiplies its inputs: mul :: Num a => T '[a, a] a mul = op2'9 $ \x y -> (x*y, \d -> (d*y, x*d) ) ARemember that, generally, end users shouldn't directly construct TDs; they should be provided by libraries or generated automatically.o Create an T] of a function taking three inputs, by giving its explicit gradient. See documentation for n for more details.pT for additionqT for subtractionrT for multiplicationsT for divisiontT for exponentiationuT for negationvT for ;wT for absolute valuexT for multiplicative inverseyT for 8zT for the natural logarithm{T for square root|T for <}T for sine~T for cosineT for tangentT for arcsineT for arccosineT for arctangentT for hyperbolic sineT for hyperbolic cosineT for hyperbolic tangentT for hyperbolic arcsineT for hyperbolic arccosineT for hyperbolic arctangentW of T s taking as and returning different b in bsOpM taking eac of the bs from the input . Composed TX of T s taking as and returning different b in bsT taking eac of the bs from the input . Composed T^T to runInputs to run it with#The total derivative of the result. The gradientA TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ATUV ]\_^lkcjimno`defghabXZ[WYpqruwvsxyz{t|}~1=>TUV[9  (c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone"#%&',-016<FNQSTVh? qAn ephemeral Wengert Tape in the environment. Used internally to track of the computational graph of variables.'For the end user, one can just imagine  s  as a required constraint on s% that allows backpropagation to work.A  s a is a value of type a that can be "backpropagated".Functions referring to is are tracked by the library and can be automatically differentiated to get their gradients and results.+For simple numeric values, you can use its $, ?, and @J instances to manipulate them as if they were the numbers they represent.If aJ contains items, the items can be accessed and extracted using lenses. A : b a can be used to access an a inside a b , using ^^. (): (A) :: a -> : a b -> b (^^.) ::  s a -> : a b ->  s b There is also ^^? ( ), to use a Prism' or B^ to extract a target that may or may not be present (which can implement pattern matching), ^^.. ( ) to use a B to extract all targets inside a , and .~~ (%) to set and update values inside a .@For more complex operations, libraries can provide functions on  s using  and related functions. This is how you can create primitive functions that users can use to manipulate your library's values.For example, the hmatrix7 library has a matrix-vector multiplication function, #> :: L m n -> R n -> L m.+A library could instead provide a function #> :: % (L m n) -> BVar (R n) -> BVar (R m)3, which the user can then use to manipulate their s of L m ns and R ns, etc.See Numeric.Backprop#liftops and documentation for  for more information.OneE all components of a value. For scalar values, this should just be , 1a. For vectors and matrices, this should set all components to one, the multiplicative identity.XShould be idempotent: Applying the function twice is the same as applying it just once.'Each type should ideally only have one 8. This coherence constraint is given by the typeclass Backprop.xAdd together two values of a type. To combine contributions of gradients, so should ideally be information-preserving. See laws for Backprop for the laws this should be expected to preserve. Namely, it should be commutative and associative, with an identity for a valid .'Each type should ideally only have one 8. This coherence constraint is given by the typeclass Backprop.O"Zero out" all components of a value. For scalar values, this should just be , 0\. For vectors and matrices, this should set all components to zero, the additive identity.XShould be idempotent: Applying the function twice is the same as applying it just once.'Each type should ideally only have one 8. This coherence constraint is given by the typeclass Backprop.If a type has a $! instance, this is the canonical .If a type has a $! instance, this is the canonical .If a type has a $! instance, this is the canonical .C$Project out a constant value if the  refers to one.DDebugging string for an E.FDebugging string for a  SomeTapeMode.Lift a value into a  representing a constant value.ZThis value will not be considered an input, and its gradients will not be backpropagated. , but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero., but with explicit add and zero. Coerce a 4 contents. Useful for things like newtype wrappers., but with explicit zero and one.evalBPL generalized to multiple inputs of different types. See documentation for  for more details.GCompares the values inside the .HCompares the values inside the .I*This will force the value inside, as well.JvalKoneDF LMNOPQRSTUVWXYEZ[\]^_`abc(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone&'<QVdh[6s for every item in a type level list based on their $ instances6s for every item in a type level list based on their $ instances6s for every item in a type level list based on their $ instancesThe canonical  for instances of .The canonical  for instances of .The canonical  for instances of . Generate an H for every type in a type-level list, if every type has an instance of . Generate an H for every type in a type-level list, if every type has an instance of . Generate an H for every type in a type-level list, if every type has an instance of .Shorter alias for , inspired by the ad library., but with explicit ., but with explicit  and ., but with explicit .Turn a function  s a ->  s b into the function a -> b that it represents.UBenchmarks show that this should have virtually no overhead over directly writing a a -> b. C is, in this situation, a zero-cost abstraction, performance-wise.See documentation of  for more information., but with explicit  and ., Nbut with explicit  and ., but with explicit  and ., but with explicit .$ for a two-argument function. See  for notes.$ for a two-argument function. See  for notes. with explicit  and . with explicit  and .  with explicit  and .! with explicit  and .;Gradient of final result with respect to output of function;Gradient of final result with respect to output of function;Gradient of final result with respect to output of functionW TUV`abcdehijklmnoZ TUVlkcjmno`dehiab  (c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone&'-<QVd  , but with $ constraints instead of Backprop constraints.The   $ asA in the constraint says that every value in the type-level list as must have a $* instance. This means you can use, say, '[Double, Float, Int] , but not '[Double, Bool, String].If you stick to  concereteh, monomorphic usage of this (with specific types, typed into source code, known at compile-time), then   $ as# should be fulfilled automatically. , but with $ constraints instead of Backprop constraints.See  for information on the   constraint. , but with $ constraints instead of Backprop constraints.See module documentation for Numeric.Backprop.Num, for information on using this with tuples. , but with $ constraints instead of Backprop constraints.See module documentation for Numeric.Backprop.Num, for information on using this with tuples. , but with $ constraints instead of Backprop constraints." , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints.# , but with $ constraints instead of Backprop constraints.$ , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints.% , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints.& , but with $ constraints instead of Backprop constraints.5Note that many automatically-generated prisms by the lens\ package use tuples, which cannot work this this by default (because tuples do not have a $ instance).}If you are writing an application or don't have to worry about orphan instances, you can pull in the orphan instances from  0https://hackage.haskell.org/package/NumInstances NumInstancesp. Alternatively, you can chain those prisms with conversions to the anonymous canonical strict tuple types in Numeric.Backprop.Tuple, which do have $ instances. myPrism :: Prism' c (a, b) myPrism . iso tupT2 t2Tup :: Prism' c (T2 a b)  , but with $ constraints instead of Backprop constraints.See documentation for * for more information and important notes.' , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints.6If you are using a list or vector, I recommend using  0https://hackage.haskell.org/package/vector-sized vector-sizedC instead: it's a fixed-length vector type with a very appropriate $ instance!  , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints. , but with $ constraints instead of Backprop constraints.  , but with $ constraints instead of Backprop constraints.! , but with $ constraints instead of Backprop constraints.;Gradient of final result with respect to output of function;Gradient of final result with respect to output of function;Gradient of final result with respect to output of functionB TUV`abcdehijklmnoB TUVlkcjmno`dehiab  88(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone&'-<QVd&> generalized to multiple inputs of different types. See the Numeric.Backprop.Op#prod, for a mini-tutorial on heterogeneous lists.Not strictly necessary, because you can always uncurry a function by passing in all of the inputs in a data type containing all of the arguments or a giant tuple. However, this could potentially also be more performant.A  ( s) '[Double, Float, Double], for instance, is a tuple of  s ',  s d, and  s '', and can be pattern matched on using  (cons) and '' (nil).1Tuples can be built and pattern matched on using  (cons) and '' (nil), as well.The    asA in the constraint says that every value in the type-level list as must have a * instance. This means you can use, say, '[Double, Float, Int] , but not '[Double, Bool, String].If you stick to  concereteh, monomorphic usage of this (with specific types, typed into source code, known at compile-time), then    as# should be fulfilled automatically.r, but allows you to provide the gradient of the "final result" with respect to the output of your function. See  for more details.Turn a function  s a ->  s b into the function a -> b2 that it represents, also computing its gradient a as well.The Rank-N type  forall s.  s  => ... is used to ensure that @s do not leak out of the context (similar to how it is used in Control.Monad.ST_), and also as a reference to an ephemeral Wengert tape used to track the graph of references. A version of o that allows you to specify the gradent of your "final result" in with respect to the output of your function.OTypically, this is just the scalar 1, or a value of components that are all 1.Instead of taking the b! gradient, the you may provide a b -> b , which  calls with the result of your function as the argument. This allows you to return something with the correct "shape", if not a scalar. is essentially  with , 1 for scalars and $ instances.Take a function  s a ->  s b, interpreted as a function a -> b5, and compute its gradient with respect to its input.The resulting a -> a tells how the input (and its components) affects the output. Positive numbers indicate that the result will vary in the same direction as any adjustment in the input. Negative numbers indicate that the result will vary in the opposite direction as any adjustment in the input. Larger numbers indicate a greater sensitivity of change, and small numbers indicate lower sensitivity.See documentation of  for more information.FIf you want to provide an explicit "final gradient" for the end, see .L generalized to multiple inputs of different types. See documentation for  for more details. for a two-argument function.Not strictly necessary, because you can always uncurry a function by passing in all of the argument inside a data type, or just use a tuple. However, this could potentially be more performant.)For 3 and more arguments, consider using .r, but allows you to provide the gradient of the "final result" with respect to the output of your function. See  for more details.# for a two-argument function. See  for notes.An infix version of , meant to evoke parallels to A from lens.KWith normal values, you can extract something from that value with a lens: x A myLens would extract a piece of x :: b, specified by  myLens :: : b a. The result has type a. xVar  myLens would extract a piece out of xVar ::  s b (a  holding a b), specified by myLens :: Lens' b a. The result has type  s a (a  holding a a)-This is the main way to pull out values from  of container types.WARNINGO: Do not use with any lenses that operate "numerically" on the contents (like  multiplying).Using a :, extract a value inside a  . Meant to evoke parallels to view from lens.See documentation for  for more information.An infix version of , meant to evoke parallels to e from lens.JWith normal values, you can set something in a value with a lens: a lens: x f myLens e y would "set" a part of x :: b, specified by  myLens :: : a b, to a new value y :: a. xVar f myLens  yVar would "set" a part of xVar ::  s b (a  holding a b), specified by  myLens :: : a b, to a new value given by  yVar ::  s a/. The result is a new (updated) value of type  s b.*This is the main way to set values inside s of container types.Using a :, set a value inside a 0. Meant to evoke parallels to "set" from lens.See documentation for  for more information.An infix version of , meant to evoke parallels to g from lens.YWith normal values, you can (potentially) extract something from that value with a lens: x g myPrism 'would (potentially) extract a piece of x :: b, specified by  myPrism :: B b a. The result has type h a. xVar  myPrism +would (potentially) extract a piece out of xVar ::  s b (a  holding a b), specified by myPrism :: Prism' b a. The result has type h ( s a) (h a  holding a a).!This is intended to be used with Prism'@s (which hits at most one target), but will actually work with any BW. If the traversal hits more than one target, the first one found will be extracted.'This can be used to "pattern match" on $s, by using prisms on constructors.Using a B, extract a single value inside a k, if it exists. If more than one traversal target exists, returns te first. Meant to evoke parallels to preview2 from lens. Really only intended to be used wth Prism'"s, or up-to-one target traversals.See documentation for  for more information.An infix version of , meant to evoke parallels to i from lens.5With normal values, you can extract all targets of a j from that value with a: x i myTraversal $would extract all targets inside of x :: b, specified by myTraversal :: B b a. The result has type [a]. xVar  myTraversal $would extract all targets inside of xVar ::  s b (a  holding a b), specified by myTraversal :: Traversal' b a. The result has type [ s a] (A list of  s holding as).Using a B, extract all targeted values inside a . Meant to evoke parallels to k from lens.See documentation for  for more information.Extract all of the  s out of a l container of s.Note that this associates gradients in order of occurrence in the original data structure; the second item in the gradient is assumed to correspond with the second item in the input, etc.; this can cause unexpected behavior in m4 instances that don't have a fixed number of items.Collect all of the s in a container into a  of that container's contents.Note that this associates gradients in order of occurrence in the original data structure; the second item in the total derivative and gradient is assumed to correspond with the second item in the input, etc.; this can cause unexpected behavior in m4 instances that don't have a fixed number of items.Lift an TP with an arbitrary number of inputs to a function on the appropriate number of s.AShould preferably be used only by libraries to provide primitive & functions for their types for users.See Numeric.Backprop#liftops and documentation for  for more information, and Numeric.Backprop.Op#prod for a mini-tutorial on using  and  .Lift an T2 with a single input to be a function on a single .AShould preferably be used only by libraries to provide primitive & functions for their types for users.See Numeric.Backprop#liftops and documentation for  for more information.Lift an T+ with two inputs to be a function on a two s.AShould preferably be used only by libraries to provide primitive & functions for their types for users.See Numeric.Backprop#liftops and documentation for  for more information.Lift an T/ with three inputs to be a function on a three s.AShould preferably be used only by libraries to provide primitive & functions for their types for users.See Numeric.Backprop#liftops and documentation for  for more information.Convert the value inside a B using a given isomorphism. Useful for things like constructors.xWarning: This is unsafe! It assumes that the isomorphisms themselves have derivative 1, so will break for things like 8 & 9<. Basically, don't use this for any "numeric" isomorphisms.Convert the values inside two Hs using a given isomorphism. Useful for things like constructors. See  for caveats. Convert the values inside three Hs using a given isomorphism. Useful for things like constructors. See  for caveats.%Convert the values inside a tuple of Hs using a given isomorphism. Useful for things like constructors. See  for caveats.;Gradient of final result with respect to output of function;Gradient of final result with respect to output of function;Gradient of final result with respect to output of functionF TUV`abcdehijklmnoI TUVlkcjmno`dehiab  88(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone<QV3 Lifted nLifted o.Lifted pLifted q.Lifted r". Undefined for situations where r would be undefined.Lifted s". Undefined for situations where s would be undefined.Lifted tI. Lifts backpropagatable functions to be backpropagatable functions on l -s. Alias for .Lifted uI. Lifts backpropagatable functions to be backpropagatable functions on l -s.Lifted vI. Lifts backpropagatable functions to be backpropagatable functions on l ws.Lifted xI. Lifts backpropagatable functions to be backpropagatable functions on l ws.Coerce items inside a .  (c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone<V>| Lifted nLifted o.Lifted pLifted q.Lifted r". Undefined for situations where r would be undefined.Lifted s". Undefined for situations where s would be undefined.Lifted tI. Lifts backpropagatable functions to be backpropagatable functions on l -s. Lifted uI. Lifts backpropagatable functions to be backpropagatable functions on l -s. Lifted vI. Lifts backpropagatable functions to be backpropagatable functions on l ws. Lifted xI. Lifts backpropagatable functions to be backpropagatable functions on l ws. Coerce items inside a .         (c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone<VIU  Lifted nLifted o.Lifted pLifted q.Lifted r". Undefined for situations where r would be undefined.Lifted s". Undefined for situations where s would be undefined.Lifted tI. Lifts backpropagatable functions to be backpropagatable functions on l -s. Alias for .Lifted uI. Lifts backpropagatable functions to be backpropagatable functions on l -s.Lifted vI. Lifts backpropagatable functions to be backpropagatable functions on l ws.Lifted xI. Lifts backpropagatable functions to be backpropagatable functions on l ws.Coerce items inside a .    y()*+,-+,.+,/+,0+,1+,2+,3+,4+,5+67+68+68+9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                   "# !"#$%&'  !"#$%&'  !   +               ! " # $ % & '  ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 :;<=>?@ABCDEFEEEEEGH'backprop-0.2.0.0-5V1HP5DRHTKISwDBMcUAN6Numeric.Backprop.ExplicitNumeric.Backprop.OpNumeric.Backprop.ClassNumeric.Backprop.NumNumeric.BackpropPrelude.BackpropPrelude.Backprop.ExplicitPrelude.Backprop.NumData.Type.UtilGHCGenericNumeric.Backprop.InternalliftOpliftOp1liftOp2liftOp3viewVarsetVar sequenceVar collectVar previewVar toListOfVar backpropN backpropWithNbackprop backpropWithgradBP backprop2 backpropWith2isoVarisoVar2isoVar3isoVarNgradBPNgradBP2^^..~~^^?^^..'reflection-2.1.3-5su5Zw7S2arHIiXmANayadData.ReflectionReifies/type-combinators-0.2.4.3-GpFGXknzxgIL2js64ktwi8Data.Type.Productonly_head'only:>::<:<ØProdTupleData.Type.CombinatorgetIIData.Type.IndexEveryGOnegoneGAddgaddGZerogzeroBackpropzeroaddone genericZero genericAdd genericOnezeroNumaddNumoneNumzeroVecaddVeconeVec zeroFunctor addIsList addAsList oneFunctor $fGZero:.: $fGZeroM1 $fGZeroU1 $fGZeroV1 $fGZero:+: $fGZero:*: $fGAdd:.:$fGAddM1$fGAddU1$fGAddV1 $fGAdd:*: $fGOne:.:$fGOneM1$fGOneU1$fGOneV1 $fGOne:+: $fGOne:*:$fBackpropOption$fBackpropProd$fBackpropIntMap $fBackpropMap$fBackpropVoid$fBackpropProxy $fBackpropI$fBackpropIdentity$fBackprop(,,,,)$fBackprop(,,,)$fBackprop(,,) $fBackprop(,) $fBackprop()$fBackpropMaybe $fBackpropSeq$fBackpropNonEmpty $fBackprop[]$fBackpropVector$fBackpropVector0$fBackpropVector1$fBackpropVector2$fBackpropDouble$fBackpropFloat$fBackpropComplex$fBackpropRatio$fBackpropInteger $fBackpropInt$fGOneK1$fGAddK1 $fGZeroK1Op runOpWith composeOp' composeOp composeOp1' composeOp1~.evalOprunOp gradOpWithgradOpopCoercenoGrad1noGradidOpopTupopIsoopIso2opIso3opIsoNopLensopConst'opConstop0op1op2op3+.-.*./.**.negateOpsignumOpabsOprecipOpexpOplogOpsqrtOp logBaseOpsinOpcosOptanOpasinOpacosOpatanOpsinhOpcoshOptanhOpasinhOpacoshOpatanhOp $fFloatingOp$fFractionalOp$fNumOpWBVarOneFuncOFrunOFAddFuncAFrunAFZeroFuncZFrunZFzfNumafNumofNumconstVar coerceVarevalBPNzfNumsafNumsofNumszeroFuncaddFunconeFunc zeroFuncsaddFuncsoneFuncsautoevalBPevalBP2sumpureproductlengthminimummaximumfmap<$>traverseliftA2liftA3coerce Replicate vecToProdvecLen zipWithPM_ zipWithPM3_zipPunzipP lengthProd listToVecDeffillProd zipVecListbaseGHC.NumNumGHC.ExtsIsList GHC.Genericsghc-prim GHC.TypesDoubleGHC.ListzipWith+GHC.Base. fromIntegerconstFunctor&vector-0.12.0.1-LflPw1fguMb6as60UrZpxNData.Vector.Generic.BaseVectorNothingJustOpContIntBoolData.Type.LengthLengthData.TraversablesequenceGHC.Primid GHC.Floatexplog(microlens-0.4.9.1-3wqsjzVxKHI2nLhceIdmENLens.Micro.TypeLens'signumlogBaseOC runOpContGHC.Real FractionalFloating Lens.Micro^. Traversal'bvConstdebugIRInpRefdebugSTN $fOrdBVar$fEqBVar $fNFDataBVar insertNode gradRunnerRunnerR_rDelta_rInputswRef SomeTapeNodeSTN_stnZero_stnNodeTapeNodeTN _tnInputs_tnGradIR_irIx_irAddBRefBRInpBRIxBRCBV_bvRef_bvValFloat.~ Data.Function&^?Maybe^.. TraversaltoListOf Traversable Data.FoldableFoldable Applicative