Packages

package graph

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. case class AssertionDLGraphInfo(path: String, nHidden: Int, featSize: Int, nClasses: Int) extends Product with Serializable

    A single AssertionDL graph, together with the dimensions parsed from its file name.

  2. case class DenseClassifierGraphFamily(annotator: String, resourceFolder: String, filePrefix: String, tfGraphModelName: String, buildParamsTemplate: String) extends Product with Serializable

    Describes a family of pre-built dense (feature vector) classifier graphs which is embedded in the library JAR.

    Describes a family of pre-built dense (feature vector) classifier graphs which is embedded in the library JAR.

    All the annotators which are trained through GenericClassifierApproach share the same TensorFlow contract (inputs, targets, outputs, loss, ... tensors), but not the same topology. Every family keeps the graphs of one topology in its own resource folder, so that the resolver never mixes, e.g., a logistic regression graph with a multi layer perceptron graph.

    annotator

    the annotator(s) using this family, only used for error messages

    resourceFolder

    JAR resource folder holding the embedded graphs of this family

    filePrefix

    file name prefix of the embedded graphs (<prefix>_<inputDim>_<outputDim>.pb)

    tfGraphModelName

    sparknlp_jsl.training.tf_graph model name able to build this family

    buildParamsTemplate

    the tf_graph.build parameters this family has been created with, only used for error messages

  3. case class DenseClassifierGraphInfo(path: String, inputDim: Int, outputDim: Int) extends Product with Serializable

    A single dense classifier graph, together with the dimensions parsed from its file name.

Value Members

  1. object AssertionDLGraphResolver

    Finds the best embedded (or user provided) graph for an AssertionDLApproach training run.

    Finds the best embedded (or user provided) graph for an AssertionDLApproach training run.

    Contrary to the dense classifier graphs, nothing is padded on the Scala side here: the word embeddings are fed with their real dimension and the labels are fed one hot encoded with the real number of classes. Both dimensions must therefore match the graph exactly. The maximum sentence length is not part of the contract anymore: graphs built with sparknlp_jsl.training.tf_graph accept any sequence length, so setMaxSentLen does not require a dedicated graph.

  2. object DenseClassifierGraphFamily extends Serializable
  3. object DenseClassifierGraphResolver

    Finds the best embedded (or user provided) graph for a dense classifier training run.

    Finds the best embedded (or user provided) graph for a dense classifier training run.

    The feature vectors and the one hot encoded labels are zero padded to the dimensions of the graph by TensorflowGenericClassifier, so a graph is usable whenever its dimensions are greater than or equal to the dimensions of the training data. Padded inputs contribute nothing to the dense layers and padded labels are never the target class, therefore the training result of a padded graph is equivalent to the training result of an exactly sized graph. Still, the smallest suitable graph is selected, and a graph with the exact number of classes is always preferred, so that the reported metrics are computed over the real classes only.

Ungrouped