AIWintermuteAI / aXeleRate

Keras-based framework for AI on the Edge
MIT License
177 stars 71 forks source link

Error importing axelerate python3 library (Illegal instruction (core dumped)) #37

Closed arthurkafer closed 3 years ago

arthurkafer commented 3 years ago

Describe the bug I'm trying to train a Mobilenet inside a fresh installed Ubuntu 18.04. After running pip install axelerate (or pip install -git+https://github.com/AIWintermuteAI/aXeleRate) I can't import axelerate inside python3.

To Reproduce I don't think it is going to be easy to reproduce it because of my environment. I'm running a Windows 10 Server with an Oracle VirtualBox. Then I installed a fresh Ubuntu 18.04 and upgraded the system with python3, build-essentials and some other libraries. Installed axelerate through pip and then the error comes in

Expected behavior Expecting just to import normally.

Screenshots The error is in portuguese, but it is a Illegal instruction error and python crashes image

Environment (following the order):

Additional context I'll also try to create another VM locally or on cloud to test it. I was originally running my tests on a Windows 10 normal machine, with all dependencies installed, but training isn't working as well there, so I switched ambient to test and train my network. On the Win machine, the script isn't finding training and validation images, I'll create another issue if I can't sort it out myself.

Thanks in advance

AIWintermuteAI commented 3 years ago

Hi there! illegal instruction is an indication of problem with running tensorflow on your machine - meaning the python import works normally, but when you do import axelerate internally it starts with importing tensorflow, where you get illegal instruction Check the issues related to import tf illegal instruction on Google or https://github.com/tensorflow/tensorflow/issues/17411

Most likely it is the old CPU issue - newer (starting from 1.15) versionf of tf binaries for x86 systems are compiled with AVX instruction set support and will not run if your CPU doesn't support it.

By the way, you can check if it is TensorFlow error by just doing import tensorflow

On the Win machine, the script isn't finding training and validation images, I'll create another issue if I can't sort it out myself.

Yes, as it says in the README, aXeleRate is only tested on Ubuntu 18.04 and Google Colab. No Windows support, as 1) some of the converters don't support Windows 2) maintaining separate OS support is too much for lone developer, like me :) If I have time I'd rather add more features - since I think Win users, who don't want to use Linux, can still just use Colab.

arthurkafer commented 3 years ago

Thanks man, unfortunately I'll have to build tensorflow from scratch but it is what it is. I think things will work fine after that, thanks again.