def __init__(self, skip=0, prior=0, segmental=False, **kwargs): CoreModel.__init__(self, name="Pretrained-Model", **kwargs) if prior: self.potentials["prior"] = priors.temporal_prior(length=prior, name="prior") self.potentials["pre"] = unary.pretrained_unary() if skip: self.potentials["pw"] = pw.pairwise(skip=skip) if segmental: self.potentials["seg_pw"] = pw.segmental_pairwise(name="seg_pw")
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")