MCPcopy Create free account
hub / github.com/davisking/dlib / __init__

Method __init__

python_examples/svm_struct.py:204–213  ·  view source on GitHub ↗
(self, samples, labels)

Source from the content-addressed store, hash-verified

202 # max_cache_size = 20
203
204 def __init__(self, samples, labels):
205 # dlib.solve_structural_svm_problem() expects the class to have
206 # num_samples and num_dimensions fields. These fields should contain
207 # the number of training samples and the dimensionality of the PSI
208 # feature vector respectively.
209 self.num_samples = len(samples)
210 self.num_dimensions = len(samples[0])*3
211
212 self.samples = samples
213 self.labels = labels
214
215 def make_psi(self, x, label):
216 """Compute PSI(x,label)."""

Callers

nothing calls this directly

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected