def __init__(self, pretrained=False, prior=0, pairwise=True, **kwargs): CoreModel.__init__(self, name="Seg-Model", **kwargs) if prior: self.potentials["prior"] = priors.temporal_prior(length=prior, name="prior") if pretrained: self.potentials["pre"] = unary.pretrained_unary() else: self.potentials["unary"] = unary.framewise_unary() if pairwise: self.potentials["seg_pw"] = pw.segmental_pairwise(name="seg_pw")
def __init__(self, n_latent, skip=1, **kwargs): # CoreLatentModel.__init__(self, n_latent, name="Latent Skip Chain Model", **kwargs) super(CoreLatentModel,self).__init__(name="Latent Skip Chain Model", **kwargs) self.potentials["prior.temporal_prior"] = priors.temporal_prior(length=30) self.potentials["unary"] = unary.framewise_unary() # if skip: self.potentials["pw2"] = pw.pairwise("pw2", skip*2) if skip: self.potentials["pw"] = pw.pairwise(skip, name="pw")
def __init__(self, skip=1, **kwargs): CoreModel.__init__(self, name="SC-Model", **kwargs) # self.potentials["class_prior"] = class_prior() # self.potentials["prior.temporal_prior"] = prior.temporal_prior(length=30) self.potentials["unary"] = unary.framewise_unary() # self.potentials["pw2"] = pw.pairwise("pw2", skip*2) if skip: self.potentials["pw"] = pw.pairwise(skip, name="pw")
def __init__(self, n_latent, skip=1, **kwargs): # CoreLatentModel.__init__(self, n_latent, name="Latent Skip Chain Model", **kwargs) super(CoreLatentModel, self).__init__(name="Latent Skip Chain Model", **kwargs) self.potentials["prior.temporal_prior"] = priors.temporal_prior( length=30) self.potentials["unary"] = unary.framewise_unary() # if skip: self.potentials["pw2"] = pw.pairwise("pw2", skip*2) if skip: self.potentials["pw"] = pw.pairwise(skip, name="pw")