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

While importing tensorlfow to load model from keras it says illegal instruction (Core Dumped) #1

Open
puri-gagan opened this issue Oct 5, 2020 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers hacktober if issued any issues use this label also #hacktoberfest if issued any issues use this label also hacktoberfest if issued any issues use this label also #hacktoberfest2020 if issued any issues use this label also help wanted Extra attention is needed question Further information is requested

Comments

@puri-gagan
Copy link
Collaborator

I've enough cpu requirement to run tensorflow and keras. I've installed tensorflow 2.2.0 and keras 2.4.3 which should be enough to run tensorflow backend keras. But while importing tensorflow it says illegal instruction (Core Dumped) and program terminates.
I've also tried uninstalling and reinstalling the keras and tensorflow in anaconda distribution.

@puri-gagan puri-gagan added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested #hacktoberfest if issued any issues use this label also #hacktoberfest2020 if issued any issues use this label also hacktober if issued any issues use this label also hacktoberfest if issued any issues use this label also labels Oct 5, 2020
@radioactive11
Copy link

radioactive11 commented Oct 6, 2020

Can I start working on this issue?

Edit1:

I'm facing this error: OSError: SavedModel file does not exist at: /Users/arijitroy/Projects/Voice-to-letter-in-Nepali-web-app/model/{saved_model.pbtxt|saved_model.pb}

@abhinand5
Copy link

If you get that error most probably it is because your CPU does not support Advanced Vector Extensions (AVX). This problem is seen mostly with older CPUs trying to run tensorflow's recent versions (after 1.6).

Anyway you can verify this using the following command if you're in a Linux based OS,
$ more /proc/cpuinfo | grep flags

You'll get an output similar to this in an Older CPU,

...
flags   : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni cx16 hypervisor lahf_lm
...

A newer CPU should output something similar to the one below

...
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm epb invpcid_single retpoline kaiser tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts
...

Note: An immediate observation is that newer CPUs come with much more features including avx

You can resolve this in two ways,

  1. Downgrading to Tensorflow 1.5 or lower
  2. Custom build Tensorflow from source

You can refer the following pages to help build TF from source, optimized for the CPU

https://www.tensorflow.org/install/source

https://tech.amikelive.com/node-882/how-to-build-and-install-the-latest-tensorflow-without-cuda-gpu-and-with-optimized-cpu-performance-on-ubuntu/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktober if issued any issues use this label also #hacktoberfest if issued any issues use this label also hacktoberfest if issued any issues use this label also #hacktoberfest2020 if issued any issues use this label also help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants