From 5f0a8171b96769f57e0ffe1df1064057c813722d Mon Sep 17 00:00:00 2001 From: wanghaoshuang Date: Wed, 20 Nov 2019 15:16:20 +0800 Subject: [PATCH] Fix slim when compressing GoogleNet. --- PaddleSlim/compress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PaddleSlim/compress.py b/PaddleSlim/compress.py index 2f5c52c0..e2afb627 100644 --- a/PaddleSlim/compress.py +++ b/PaddleSlim/compress.py @@ -48,7 +48,7 @@ def compress(args): # model definition model = models.__dict__[args.model]() - if args.model is "GoogleNet": + if args.model == "GoogleNet": out0, out1, out2 = model.net(input=image, class_dim=args.class_dim) cost0 = fluid.layers.cross_entropy(input=out0, label=label) cost1 = fluid.layers.cross_entropy(input=out1, label=label) -- GitLab