Ejemplo n.º 1
0
    def coefficients(self):
        if self._coefficients is None:
            self._coefficients = db.get_ops_by_name(op_name="coefficients",
                                                    graph_id=self.id)[0]
        print(self._coefficients.id)

        if self._coefficients.status == "computed":
            return self._coefficients.output
        else:
            raise Exception("Need to train the model first")
Ejemplo n.º 2
0
 def get_ops_by_name(self, op_name, graph_id=None):
     ops = db.get_ops_by_name(op_name=op_name, graph_id=graph_id)
     return [Op(id=op.id) for op in ops]