Skip to content

Commit

Permalink
[Fix] Fix inputs dtype convert in data preprocessor (open-mmlab#1975)
Browse files Browse the repository at this point in the history
  • Loading branch information
MeowZheng authored Aug 26, 2022
1 parent 8de0050 commit ef2152f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mmseg/models/data_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ def forward(self, data: dict, training: bool = False) -> Dict[str, Any]:
if self.channel_conversion and inputs[0].size(0) == 3:
inputs = [_input[[2, 1, 0], ...] for _input in inputs]

inputs = [_input.float() for _input in inputs]
if self._enable_normalize:
inputs = [(_input - self.mean) / self.std for _input in inputs]
else:
inputs = [_input.float() for _input in inputs]

if training:
assert data_samples is not None, ('During training, ',
Expand Down

0 comments on commit ef2152f

Please sign in to comment.