forked from jiuyuan/InfiniTensor
feat: 直接支持改边
Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
parent
7bdaea97ba
commit
6cd08abad9
|
@ -1 +1 @@
|
|||
Subproject commit b26483a39c1d4813a52718d6c9f793e4f1e349a7
|
||||
Subproject commit 520f88d812136092735acc410dd399f5141b5be4
|
|
@ -34,8 +34,9 @@ class Handler {
|
|||
explicit Handler(Graph g) : _g(std::move(g)) {}
|
||||
std::unordered_set<Name> fillEdgeInfo() { return _g.fillEdgeInfo(); }
|
||||
void setInput(size_t index, std::shared_ptr<Tensor> tensor) {
|
||||
ASSERT(_g.setInput(index, std::move(tensor)),
|
||||
fmt::format("set input {} failed with wrong shape", index));
|
||||
ASSERT(index < _g.internal().topology.globalInputsCount(),
|
||||
fmt::format("set input {} failed with wrong index", index));
|
||||
_g.internal().edges[index].tensor = std::move(tensor);
|
||||
}
|
||||
void substitute(const char *name, int64_t value) {
|
||||
ASSERT(_g.substitute(name, value),
|
||||
|
|
Loading…
Reference in New Issue