Search code examples
pythondeep-learningconv-neural-networktflearn

ModuleNotFoundError: No module named 'ioc' in TFlearn Image Classification


I am designing an image classifier using CNN in python, pycharm. I want to plot an accuracy graph at the end. Following is my code to plot the graph:

 hist = {
'Accuracy' : [x.value for x in ea.Scalars('Accuracy')],
'Validation Accuracy' : [x.value for x in     ea.Scalars('Accuracy/Validation')], 
'Loss' : [x.value for x in ea.Scalars('Loss')],
'Validation Loss' : [x.value for x in ea.Scalars     
('Loss/Validation')]
}

fig = plt.figure()
keys = ['Accuracy', 'Loss', 'Validation Accuracy', 'Validation Loss']
for i,thing in enumerate(keys):
    trace = hist[thing]
    plt.subplot(2,2,i+1)
    plt.plot(range(len(trace)), trace)
    plt.title(thing)

fig.set_tight_layout(True)
fig

When I execute this code I get the following error:

Traceback (most recent call last):
  File "E:/VISION - CIFAR 10/CNN - CIFAR Ten/Trainig Model.py", line 4,          in <module>
    import ea as ea
  File "C:\Users\Wahab Abid\CNN - CIFAR Ten\lib\site-packages    \ea\__init__.py", line 1, in <module>
    from ea import cqrs
  File "C:\Users\Wahab Abid\CNN - CIFAR Ten\lib\site-packages\ea\cqrs    \__init__.py", line 3, in <module>
    from ea.cqrs.command import Command
   File "C:\Users\Wahab Abid\CNN - CIFAR Ten\lib\site-packages\ea\cqrs\command\__init__.py", line 2, in <module>
    from ea.cqrs.command.provider import CommandHandlerProvider
  File "C:\Users\Wahab Abid\CNN - CIFAR Ten\lib\site-packages\ea\cqrs    \command\provider.py", line 3, in <module>
    import ioc.loader
ModuleNotFoundError: No module named 'ioc'

Can Someone Help?? I get it that the problem is with the import:

import ea as ea

I just don't get it that how to solve it and where to look. Thanks.

edit: the answer below by ncica solved this problem, but now it is providing another error:

Traceback (most recent call last):
  File "E:/VISION - CIFAR 10/CNN - CIFAR Ten/Trainig Model.py", line 157, in <module>
    'Accuracy' : [x.value for x in ea.Scalars('Accuracy')],
AttributeError: module 'ea' has no attribute 'Scalars'

Can anyone help with this? thanks.


Solution

    • File -> Settings -> Project interpreter:

    enter image description here