GUI Bugfix - Handle underscores in config options correctly

This commit is contained in:
torzdf 2021-05-01 11:09:14 +01:00
parent 91a6a50255
commit 3092d1421c
2 changed files with 4 additions and 5 deletions

View File

@ -1045,8 +1045,9 @@ class ControlBuilder():
intro = ""
if any(line.startswith(" - ") for line in all_help):
intro = all_help[0]
retval = (intro, {re.sub(r'[^A-Za-z0-9\-]+', '',
line.split()[1].lower()): " ".join(line.split()[1:])
retval = (intro,
{re.sub(r"[^A-Za-z0-9\-\_]+", "",
line.split()[1].lower()): " ".join(line.replace("_", " ").split()[1:])
for line in all_help if line.startswith(" - ")})
logger.debug("help items: %s", retval)
return retval

View File

@ -944,8 +944,6 @@ class _Weights():
in the plugin's configuration. """
# Blanket unfreeze layers, as checking the value of :attr:`layer.trainable` appears to
# return ``True`` even when the weights have been frozen
# TODO this may cause some issues with some keras-app models that are meant to have some
# frozen layers
for layer in _get_all_sub_models(self._model):
layer.trainable = True