forked from jiuyuan/InfiniTensor
parent
71a87c27d1
commit
62fd619987
|
@ -351,7 +351,6 @@ def to_onnx(graph: backend.GraphHandler, name: str) -> ModelProto:
|
||||||
|
|
||||||
def push_output(self, name: str, tensor: backend.Tensor) -> str:
|
def push_output(self, name: str, tensor: backend.Tensor) -> str:
|
||||||
self.names[tensor] = name
|
self.names[tensor] = name
|
||||||
# TODO 需要判断全图输出并保存到 outputs
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
def push_input(self, tensor: backend.Tensor) -> str:
|
def push_input(self, tensor: backend.Tensor) -> str:
|
||||||
|
|
|
@ -29,7 +29,7 @@ void export_values(py::module &m) {
|
||||||
#define VALUE(TYPE, NAME) value(#NAME, TYPE::NAME)
|
#define VALUE(TYPE, NAME) value(#NAME, TYPE::NAME)
|
||||||
|
|
||||||
py::enum_<ActType>(m, "ActType")
|
py::enum_<ActType>(m, "ActType")
|
||||||
.value("Linear", ActType::None) // None 是 Python 关键字,不能用
|
.value("Linear", ActType::None) // `None` is Python keyword
|
||||||
.VALUE(ActType, Relu)
|
.VALUE(ActType, Relu)
|
||||||
.VALUE(ActType, Sigmoid)
|
.VALUE(ActType, Sigmoid)
|
||||||
.VALUE(ActType, Tanh)
|
.VALUE(ActType, Tanh)
|
||||||
|
|
Loading…
Reference in New Issue