forked from jiuyuan/InfiniTensor
fix: add comments
This commit is contained in:
parent
917e82e90c
commit
5862671c0c
|
@ -85,6 +85,7 @@ class OnnxStub:
|
|||
while len(sorted_nodes) < len(model.graph.node):
|
||||
updated = False
|
||||
for i, node in enumerate(model.graph.node):
|
||||
# TODO:目前只考虑了resize算子输入为空的情况
|
||||
if all(t in known_edge or t == "" for t in node.input):
|
||||
node.name = str(len(sorted_nodes)) + "_" + node.name
|
||||
sorted_nodes.append(i)
|
||||
|
|
|
@ -85,6 +85,8 @@ class ResizeCnnl : public BangKernelWithoutConfig {
|
|||
cnnlCropAndResizeMode_t mode;
|
||||
auto coefMode = op->getMode();
|
||||
if (coefMode == ResizeObj::ECoeffMode::nearest) {
|
||||
// CNNL uses round by default and
|
||||
// does not support other nearest modes
|
||||
mode = CNNL_CROP_AND_RESIZE_NEAREST;
|
||||
} else if (coefMode == ResizeObj::ECoeffMode::linear) {
|
||||
mode = CNNL_CROP_AND_RESIZE_BILINEAR;
|
||||
|
|
Loading…
Reference in New Issue