fix the retrain model to eager closes #78
This commit is contained in:
parent
5f11126acd
commit
095a37189d
@ -350,7 +350,7 @@ func generateCvsExpandExp(c *Context, run_path string, model_id string, offset i
|
||||
return
|
||||
}
|
||||
if file_path == "id://" {
|
||||
f.Write([]byte(id + "," + strconv.Itoa(-1) + "\n"))
|
||||
f.Write([]byte(id + "," + strconv.Itoa(-2) + "\n"))
|
||||
} else {
|
||||
return count, errors.New("TODO generateCvs to file_path " + file_path)
|
||||
}
|
||||
@ -529,7 +529,7 @@ func trainDefinitionExpandExp(c *Context, model *BaseModel, definition_id string
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
os.RemoveAll(run_path)
|
||||
c.Logger.Info("Model finished training!", "accuracy", accuracy)
|
||||
return
|
||||
|
@ -49,7 +49,7 @@ def pathToLabel(path):
|
||||
num = table.lookup(tf.strings.as_string([path]))
|
||||
|
||||
return tf.cond(
|
||||
tf.math.equal(num, tf.constant(-1)),
|
||||
tf.math.equal(num, tf.constant(-2)),
|
||||
lambda: tf.zeros([depth]),
|
||||
lambda: tf.one_hot(table.lookup(tf.strings.as_string([path])) - diff, depth)[0]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user