Skip to content

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

@dexterdev

Description

@dexterdev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions