Skip to content

Commit

Permalink
fix(format): remove check variables dir for savedmodel (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-cj authored Dec 30, 2020
1 parent cdf84b0 commit cd8d716
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/model/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit cd8d716

Please sign in to comment.