From c1c298e71b7170de55f9617e09c656db663f6017 Mon Sep 17 00:00:00 2001 From: twairball Date: Thu, 20 Jul 2017 09:34:53 +0800 Subject: [PATCH] This PR fixes error raised during element-wise variable division. - Fixes #181 --- fast_neural_style/neural_style/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast_neural_style/neural_style/utils.py b/fast_neural_style/neural_style/utils.py index d86b243440..525c25148c 100644 --- a/fast_neural_style/neural_style/utils.py +++ b/fast_neural_style/neural_style/utils.py @@ -39,5 +39,5 @@ def normalize_batch(batch): std[:, 2, :, :] = 0.225 batch = torch.div(batch, 255.0) batch -= Variable(mean) - batch /= Variable(std) + batch = batch / Variable(std) return batch