public TapeElement Visit(Exp exp)
            {
                return(Compile(exp, () =>
                {
                    var argElement = exp.Arg.Accept(this);
                    var element = new Compiled.Exp
                    {
                        Inputs = MakeInputEdges(() =>
                        {
                            edges.Add(new InputEdge {
                                Element = argElement
                            });
                        }),
                    };

                    return element;
                }));
            }
            public int Visit(Exp exp)
            {
                return(Compile(exp, () =>
                {
                    var argIndex = exp.Arg.Accept(this);
                    var element = new Compiled.Exp
                    {
                        Arg = argIndex,
                        Inputs = new Compiled.InputEdge[]
                        {
                            new Compiled.InputEdge {
                                Index = argIndex
                            },
                        },
                    };

                    return element;
                }));
            }
 public void Visit(Compiled.Exp elem)
 {
     elem.Value            = Math.Exp(ValueOf(elem.Arg));
     elem.Inputs[0].Weight = elem.Value;
 }
 public void Visit(Compiled.Exp elem)
 {
     LocalDerivative = elem.Adjoint * elem.Value;
 }
 public void Visit(Compiled.Exp elem)
 {
     elem.Value = Math.Exp(ValueOf(elem.Arg));
 }