waleedka / hiddenlayer

Neural network graphs and training metrics for PyTorch, Tensorflow, and Keras.
MIT License
1.79k stars 266 forks source link

fix AttributeError #7

Closed AutuanLiu closed 5 years ago

AutuanLiu commented 5 years ago
AttributeError: module 'hiddenlayer' has no attribute 'transforms'
waleedka commented 5 years ago

In what case do you get this error? Typically, I import the transforms as such:

from hiddenlayer import transforms as ht

Does that work for you?

AutuanLiu commented 5 years ago
  1. If I import the transforms as following, it work well.
    
    from hiddenlayer import transforms as ht

ht.Rename()


2. However, the following case will raise error:  "AttributeError: module 'hiddenlayer' has no attribute 'transforms'".
```python
import hiddenlayer as hl

hl.transforms.Rename()
waleedka commented 5 years ago

Thank you! I added

import transforms

in __init__.py. That should fix the case you described.