the code may cause problem that loss change in training.
This commit is contained in:
gaotingquan 2022-05-24 13:38:29 +00:00 committed by Tingquan Gao
parent 6886cf0d65
commit 20730fad07

View File

@ -15,7 +15,6 @@
import copy
import importlib
import paddle
import paddle.nn as nn
from paddle.jit import to_static
from paddle.static import InputSpec
@ -46,14 +45,6 @@ def build_model(config, mode="train"):
prune_model(config, arch)
quantize_model(config, arch, mode)
logger.info("The FLOPs and Params of Arch:")
try:
flops = paddle.flops(arch, [1, *config["Global"]["image_shape"]])
except Exception as e:
logger.warning(
f"An error occurred when calculating FLOPs and Params of Arch. Please check the Global.image_shape in config. The details of error is: {e}"
)
return arch