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

AttributeError: module 'glow.metrics' has no attribute 'get' #29

Open
dexterdev opened this issue Jul 28, 2021 · 0 comments
Open

AttributeError: module 'glow.metrics' has no attribute 'get' #29

dexterdev opened this issue Jul 28, 2021 · 0 comments

Comments

@dexterdev
Copy link

dexterdev commented Jul 28, 2021

I was running the test code in the page https://pyglow.github.io/ on google colab. It gave me this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-18-0ea5fc0ad3bd> in <module>()
     35 
     36 # train the model along with calculating dynamics
---> 37 model.fit_generator(train_loader, val_loader, num_epochs)

2 frames
/usr/local/lib/python3.7/dist-packages/glow/models/network.py in fit_generator(self, train_loader, val_loader, num_epochs, show_plot)
    291 
    292         """
--> 293         self.training_loop(num_epochs, train_loader, val_loader, show_plot)
    294 
    295     def predict(self, x):

/usr/local/lib/python3.7/dist-packages/glow/models/network.py in training_loop(self, num_epochs, train_loader, val_loader, show_plot)
    181         train_len = len(train_loader)
    182         val_len = len(val_loader)
--> 183         metric_dict = self.handle_metrics(self.metrics)
    184         epoch_collector = []
    185         for epoch in range(num_epochs):

/usr/local/lib/python3.7/dist-packages/glow/models/network.py in handle_metrics(self, metrics)
    134         metric_dict = {}
    135         for metric in metrics:
--> 136             metric_fn = metric_module.get(metric)  # returns the function
    137             metric_dict[metric] = metric_fn
    138 

AttributeError: module 'glow.metrics' has no attribute 'get'

I don't understand what to do about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant