Skip to content

Commit

Permalink
fix bug: KeyError, can't find some parameter key (#12211)
Browse files Browse the repository at this point in the history
Co-authored-by: woobinw <Wubin.Wu@imgtec.com>
  • Loading branch information
woobinw and woobinw authored Jul 31, 2022
1 parent 42dd6af commit 66a1b9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/relay/frontend/paddlepaddle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2268,7 +2268,7 @@ def from_translated_layer(self, layer, shape_dict):
self.shape_dict = shape_dict
program = layer.program()
parameters = dict()
for param in layer.parameters():
for param in layer.parameters() + layer.buffers():
parameters[param.name] = np.array(param.value().get_tensor())
self.check_unsupported_ops(program)
self.extract_parameters(program, parameters)
Expand Down

0 comments on commit 66a1b9f

Please sign in to comment.