From cd8d7163ecbdb4dfa91b422846140286c780443a Mon Sep 17 00:00:00 2001 From: Jun Chen Date: Wed, 30 Dec 2020 18:11:08 +0800 Subject: [PATCH] fix(format): remove check variables dir for savedmodel (#166) --- pkg/model/format.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/model/format.go b/pkg/model/format.go index 431a710..8f70a6e 100644 --- a/pkg/model/format.go +++ b/pkg/model/format.go @@ -89,21 +89,14 @@ func ValidateError(modelPath string, modelName string, modelNum int32) error { func (f Format) validateForSavedModel(modelPath string, files []os.FileInfo) error { var pbFileNum int32 - var variablesDirNum int32 for _, file := range files { if file.Name() == "saved_model.pb" { pbFileNum++ } - if file.IsDir() && file.Name() == "variables" { - variablesDirNum++ - } } if e := ValidateError(modelPath, "saved_model.pb", pbFileNum); e != nil { return e } - if e := ValidateError(modelPath, "variables", variablesDirNum); e != nil { - return e - } return nil }