Commit 0abc85d27951a0779a305c38bdd39d2464f8e609
1 parent
c2d82dbd
LoadStore check if child is trainable
Showing
1 changed file
with
4 additions
and
2 deletions
openbr/plugins/core/loadstore.cpp
| @@ -66,10 +66,12 @@ private: | @@ -66,10 +66,12 @@ private: | ||
| 66 | if (transform != NULL) return; | 66 | if (transform != NULL) return; |
| 67 | if (fileName.isEmpty()) fileName = QRegExp("^[_a-zA-Z0-9]+$").exactMatch(transformString) ? transformString : QtUtils::shortTextHash(transformString); | 67 | if (fileName.isEmpty()) fileName = QRegExp("^[_a-zA-Z0-9]+$").exactMatch(transformString) ? transformString : QtUtils::shortTextHash(transformString); |
| 68 | 68 | ||
| 69 | - if (!tryLoad()) | 69 | + if (!tryLoad()) { |
| 70 | transform = make(transformString); | 70 | transform = make(transformString); |
| 71 | - else | 71 | + trainable = transform->trainable; |
| 72 | + } else { | ||
| 72 | trainable = false; | 73 | trainable = false; |
| 74 | + } | ||
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | bool timeVarying() const | 77 | bool timeVarying() const |