Class Weights.ModelWeights

java.lang.Object
qupath.bioimageio.spec.Weights.ModelWeights
Enclosing class:
Weights

public static class Weights.ModelWeights extends Object
Model weights information for a specific format.
  • Constructor Details

    • ModelWeights

      public ModelWeights()
  • Method Details

    • getSource

      public String getSource()
      Get the source file or link (http etc.)
      Returns:
      The source, if present
    • getAttachments

      public Map<String,?> getAttachments()
      Attachments that are specific to this weights entry
      Returns:
      The attachments. Unclear what these may be.
    • getParent

      public String getParent()
      The source weights these weights were converted from. For example, if a model's weights were converted from the `pytorch_state_dict` format to `torchscript`, The `pytorch_state_dict` weights entry has no `parent` and is the parent of the `torchscript` weights. All weight entries except one (the initial set of weights resulting from training the model), need to have this field.
      Returns:
      The parent
    • getSha256

      public String getSha256()
      Get the SHA of the source file.
      Returns:
      The SHA256 hash of the file.
    • getAuthors

      public List<Author> getAuthors()
      Either the person(s) that have trained this model resulting in the original weights file. (If this is the initial weights entry, i.e. it does not have a `parent`) Or the person(s) who have converted the weights to this weights format. (If this is a child weight, i.e. it has a `parent` field)
      Returns:
      The authors.
    • toString

      public String toString()
      Overrides:
      toString in class Object