Documentation
¶
Overview ¶
Package testing includes testing tools shared by the examples.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadPythonEmbeddingsList ¶
ReadPythonEmbeddingsList returns all the embedding values written as text as a large []float32. It's up to the caller to split it according to the expected shape.
It's called "Python" because these embeddings are generated by the test python scripts in internal/py.
func ValidateEmbeddingTensor ¶
func ValidateEmbeddingTensor(t *testing.T, got []float32, expected []float32, name string, batchSize, gotSentenceLen, expectedSentenceLen int)
ValidateEmbeddingTensor validates the values of a tensor. It checks the values of the first expectedSentenceLen tokens only, ignoring the padding in case gotSentencenLen > expectedSentenceLen.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.