Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

construct_embedding_network in tf_modelers.py #78

Open
evanmiyakawa opened this issue Jun 24, 2021 · 0 comments
Open

construct_embedding_network in tf_modelers.py #78

evanmiyakawa opened this issue Jun 24, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@evanmiyakawa
Copy link
Collaborator

In both TFModeler.build_model() and TFModeler.hyperoptimize(), use of construct_embedding_network() attempts to take arguments passed in params, but the expression used to identify these parameters doesn't actually work because it doesn't successfully convert the params to lower case. Here's an example inside TFModeler.build_model():

self.model = self.construct_embedding_network(
    **{k.lower(): v for k, v in params.items() if k in construction_args}
)

This expression correctly makes the dict keys lower case, but does not convert the params keys to lower case when searching for them in construction_args, leading to no custom params actually being used in construct_embedding_network(), such as DROPOUT_SHARE and DENSE_LAYERS.

Simply making this modification should fix this for the places where this occurs:

self.model = self.construct_embedding_network(
    **{k.lower(): v for k, v in params.items() if k.lower() in construction_args}
)
@evanmiyakawa evanmiyakawa added the bug Something isn't working label Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant