Skip to content

Commit

Permalink
fix input shape parsing (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobeltrami authored Jan 16, 2024
1 parent e9af6c5 commit ef961a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion recipes/object_detection/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def forward(self, img):
)

hparams = parse_configuration(sys.argv[1])
if isinstance(hparams.input_shape, str):
if len(hparams.input_shape) != 3:
hparams.input_shape = [
int(x) for x in "".join(hparams.input_shape).split(",")
] # temp solution
Expand Down
2 changes: 1 addition & 1 deletion recipes/object_detection/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def replace_datafolder(hparams, data_cfg):
if __name__ == "__main__":
assert len(sys.argv) > 1, "Please pass the configuration file to the script."
hparams = parse_configuration(sys.argv[1])
if isinstance(hparams.input_shape, str):
if len(hparams.input_shape) != 3:
hparams.input_shape = [
int(x) for x in "".join(hparams.input_shape).split(",")
] # temp solution
Expand Down

0 comments on commit ef961a0

Please sign in to comment.