mirror of
https://github.com/mit-han-lab/tinyengine.git
synced 2025-10-20 13:44:53 +08:00
support patchbased inference and se block graph optimization
This commit is contained in:
@@ -165,3 +165,11 @@ class PatchResizer:
|
||||
_changeOPTensorSize(self.layer[i], "input", 1, layer_info["input_h"], layer_info["input_w"])
|
||||
else:
|
||||
layer_info["is_patch"] = False
|
||||
|
||||
# We need to cut off the link between patch blocks and normal inference blocks,
|
||||
# so the memory buffers can be allocated successfully
|
||||
if PatchLayers > 0:
|
||||
self.layer[PatchLayers].params["input_idx"] = (
|
||||
str(self.layer[PatchLayers].params["input_idx"]) + "_start_normal_infernece_block"
|
||||
)
|
||||
self.layer[PatchLayers].input_tensors[0].graph_idx = self.layer[PatchLayers].params["input_idx"]
|
||||
|
Reference in New Issue
Block a user