[英]Illegal instruction on the arm
import tensorflow as tf
m1 = tf.constant([[3, 3]])
print(m1)
m2 = tf.constant([[2], [3]])
print(m2)
product = tf.matmul(m1, m2)
sess = tf.Session()
result = sess.run(product)
print(result)
sess.close()
在arm上運行時,出現如下問題:
0
非法指令
也就是說,報“sess.run(train)”錯誤,“sess.run()”函數在arm上。 我測試過function可以運行,即梯度下降不能正常運行; 存在非法指令問題; 中央處理器:
root@EmbedSky-Board:/xzy/mix# lscpu
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 4
Socket(s): 1
Model name: ARMv7 Processor rev 10 (v7l)
CPU max MHz: 996.0000
CPU min MHz: 792.0000
root@EmbedSky-Board:/xzy/mix# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 6.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10
The ARM is TQIMX6Q that is NXP i.MX6Q Cortex-A9 4x1GHz from TianQian,Tensorflow from https://www.piwheels.org/simple/tensorflow/ , the error that illegal instruction may be caused by the difference between arm instruction set and x86指令集,但是不知道怎么解決
我在 M1 Mac 上使用 TensorFlow 時遇到了相關問題。 解決方法是使用一個通用的arm版本的TF。
在此處找到安裝這些版本的說明: https://www.tensorflow.org/tfx/serving/setup
編輯: apt-get update && apt-get install tensorflow-model-server-universal
應該可以工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.