multiple fixes
This commit is contained in:
@@ -136,17 +136,16 @@ func processZipFile(c *Context, model *BaseModel) {
|
||||
return
|
||||
}
|
||||
|
||||
if paths[0] != "training" {
|
||||
if paths[0] == "training" {
|
||||
training = InsertIfNotPresent(training, paths[1])
|
||||
} else if paths[0] != "testing" {
|
||||
} else if paths[0] == "testing" {
|
||||
testing = InsertIfNotPresent(testing, paths[1])
|
||||
}
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(testing, training) {
|
||||
c.Logger.Info("Diff", "testing", testing, "training", training)
|
||||
failed("Testing and Training datesets are diferent")
|
||||
return
|
||||
c.Logger.Warn("Diff", "testing", testing, "training", training)
|
||||
c.Logger.Warn("Testing and traing datasets differ")
|
||||
}
|
||||
|
||||
base_path := path.Join("savedData", model.Id, "data")
|
||||
|
||||
@@ -37,7 +37,7 @@ func ReadJPG(scope *op.Scope, imagePath string, channels int64) *image.Image {
|
||||
return image.Scale(0, 255)
|
||||
}
|
||||
|
||||
func runModelNormal(base BasePack, model *BaseModel, def_id string, inputImage *tf.Tensor) (order int, confidence float32, err error) {
|
||||
func runModelNormal(model *BaseModel, def_id string, inputImage *tf.Tensor) (order int, confidence float32, err error) {
|
||||
order = 0
|
||||
err = nil
|
||||
|
||||
@@ -193,7 +193,7 @@ func ClassifyTask(base BasePack, task Task) (err error) {
|
||||
}
|
||||
} else {
|
||||
base.GetLogger().Info("Running model normal", "model", model.Id, "def", def_id)
|
||||
vi, confidence, err = runModelNormal(base, model, def_id, inputImage)
|
||||
vi, confidence, err = runModelNormal(model, def_id, inputImage)
|
||||
if err != nil {
|
||||
task.UpdateStatusLog(base, TASK_FAILED_RUNNING, "Failed to run model")
|
||||
return
|
||||
|
||||
@@ -1298,12 +1298,6 @@ func generateExpandableDefinition(c BasePack, model *BaseModel, target_accuracy
|
||||
|
||||
order++
|
||||
|
||||
// handle the errors inside the pervious if block
|
||||
if err != nil {
|
||||
failed()
|
||||
return
|
||||
}
|
||||
|
||||
// Create the blocks
|
||||
loop := int((math.Log(float64(model.Width)) / math.Log(float64(10))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user