TorchLean API

NN.API.Trainer.Results

Training Results #

Regression, cross-entropy, and custom losses all return the same trained-model type. Capabilities that do not apply to every task, such as the current IBP verifier, are stored as optional operations.

Result of checking an output box with the trained-model IBP verifier.

  • nodes :

    Number of IR nodes in the compiled verifier graph.

  • outputDim :

    Flattened output dimension reported by the verifier.

  • lo : String

    Lower bound on the flattened output box.

  • hi : String

    Upper bound on the flattened output box.

Instances For

    One-line verification summary.

    Instances For

      Print the verification summary.

      Instances For

        A trained TorchLean model.

        The handle owns the live runtime state through its closures. predict and predictBatch are available for every task. verifyRobustLInf? is present when the training path can compile the trained parameters to the checked IBP verifier.

        Instances For

          One-line summary for the completed training run.

          Instances For

            Print the before/after training summary.

            Instances For
              def TorchLean.Trainer.TrainResult.printPrediction {σ τ : Shape} (result : TrainResult σ τ) (label : String) (x : Tensor.T Float σ) :

              Print one prediction with a caller-supplied label.

              Instances For

                Verify a uniform $\ell_\infty$ ball around center.

                The method fails explicitly when the training path did not attach the checked IBP capability.

                Instances For
                  def TorchLean.Trainer.TrainResult.printRobustLInf {σ τ : Shape} (result : TrainResult σ τ) (center : Tensor.T Float σ) (eps : Float) :

                  Verify a uniform $\ell_\infty$ ball and print the resulting output interval.

                  Instances For
                    @[implicit_reducible]

                    A trained model returned by step-indexed stream training.

                    Generated or resampled workloads may not have one static dataset to summarize. The ordinary trained handle is paired with the evaluation curve collected from a caller-provided sample.

                    Instances For

                      One-line summary for the trained stream run.

                      Instances For

                        Print the stream training summary.

                        Instances For

                          Run one prediction through the trained stream result.

                          Instances For

                            Run several predictions through the trained stream result.

                            Instances For
                              structure TorchLean.Trainer.PairStreamTrainResult (σ₁ τ₁ σ₂ τ₂ : Shape) :

                              Two trained regression models and the coupled metric recorded by an alternating stream.

                              • first : TrainResult σ₁ τ₁

                                Trained handle for the first model.

                              • second : TrainResult σ₂ τ₂

                                Trained handle for the second model.

                              • Task-specific curve recorded by the caller-provided evaluation function.

                              Instances For
                                def TorchLean.Trainer.PairStreamTrainResult.summary {σ₁ τ₁ σ₂ τ₂ : Shape} (result : PairStreamTrainResult σ₁ τ₁ σ₂ τ₂) :

                                One-line summary for the two trained models.

                                Instances For
                                  def TorchLean.Trainer.PairStreamTrainResult.printSummary {σ₁ τ₁ σ₂ τ₂ : Shape} (result : PairStreamTrainResult σ₁ τ₁ σ₂ τ₂) :

                                  Print the trained-handle summary for both models.

                                  Instances For
                                    def TorchLean.Trainer.PairStreamTrainResult.printCurveSummary {σ₁ τ₁ σ₂ τ₂ : Shape} (result : PairStreamTrainResult σ₁ τ₁ σ₂ τ₂) (metric : String := "loss") :

                                    Print the endpoints of the coupled metric curve.

                                    Instances For
                                      @[implicit_reducible]
                                      instance TorchLean.Trainer.PairStreamTrainResult.instToString {σ₁ τ₁ σ₂ τ₂ : Shape} :
                                      ToString (PairStreamTrainResult σ₁ τ₁ σ₂ τ₂)