当前位置:网站首页>香橙派orangepi4b上安装tensorflow与transformer
香橙派orangepi4b上安装tensorflow与transformer
2022-06-22 00:06:00 【qq_27158179】
0. 环境
香橙派4
Orangepi4_2.1.2_ubuntu_bionic_desktop_linux4.4.179.7z
插上TTL
注意WIN10无法使用CP2102,CH340可以,经过测试FT232也可以。
波特率 1500000
登陆root/orangepi或者orangepi/orangepi
1. python3.7
wget https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz
sudo tar -xvf Python-3.7.13.tgz
cd /Python-3.7.13
确认gcc g++
gcc -v
g++ -v
sudo ./configure --prefix=/usr/local/python37
make -j6
sudo make install
创建软链接
sudo ln -s /usr/local/python37/bin/python3.7 /usr/bin/python3.7
sudo ln -s /usr/bin/python3.7 /usr/bin/python3
sudo ln -s /usr/local/python37/bin/python3.7 /usr/bin/python3.7
sudo ln -s /usr/local/python37/bin/pip3.7 /usr/bin/pip3
板子设置pip源
mkdir ~/.pip
vim ~/.pip/pip.conf
[global]
index-url=http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
2. tensorflow
https://tf.kmtea.eu/whl/stable.html
复制tensorflow-2.7.0-cp37-cp37m-linux_aarch64.whl到板子上
安装tensorflow
pip3 install tensorflow-2.7.0-cp37-cp37m-linux_aarch64.whl
验证
[email protected]:/usr/bin$ python3
Python 3.7.13 (default, Mar 31 2022, 03:01:08)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> print(hello)
tf.Tensor(b'Hello, TensorFlow!', shape=(), dtype=string)
>>> ^Z
[12]+ Stopped python3
[email protected]:/usr/bin$
3. transformers
pip3 install transformers
python3
from transformers import pipeline
classifier = pipeline('sentiment-analysis')
classifier('We are very happy to introduce pipeline to the transformers repository.')
开机内存大概400M,运行后内存850M。
边栏推荐
猜你喜欢

Pytorch learning 10: statistical operations

Pytorch learning 13: implement letnet and learning nn Module related basic operations

The interviewer asked me how the order ID was generated? Is it not MySQL self incrementing primary key?

Pytorch learning 12: automatic derivation

Graphical understanding of the article "text classification of Sina News Based on tensorflow+rnn"
![[environment stepping on the pit] open the picture with OpenCV and report an error](/img/6d/4679cfebf2dfd43566c976d435ea84.png)
[environment stepping on the pit] open the picture with OpenCV and report an error

合理选择液压滑环密封间隙的重要性

pytorch学习11:where 和 gather

对“基于tensorflow+RNN的新浪新闻文本分类”一文的图示化理解

Tom Ellison, the new CFO of mendix, promoted the next stage of rapid growth of the company through the transformation of the leadership team
随机推荐
Graphical understanding of the article "text classification of Sina News Based on tensorflow+rnn"
纯净IP怎么判断?哪里有?贵吗?
HDOJ - Is It A Tree?
【环境踩坑】在自己电脑上搭建FastDFS
0x00007ffff3d3ecd0 in _IO_vfprintf_internal (s=0x7ffff40b5620 <_IO_2_1_stdout_>
cygwin下面用mysql client连接服务器的问题
【环境踩坑】用opencv打开图片时报错
Powershell 函数在数学表达式中的使用
安装EasyX-VC2019
pytorch学习03:张量数据类型和一些操作
Div set scrolling and monitor scrolling distance
It took 2 hours to build an Internet of things project, which is worth~
合理选择液压滑环密封间隙的重要性
pytorch学习01:梯度下降实现简单线性回归
pytorch学习08:拼接与拆分
[GLib][GStreamer] 插件编写思路 —— 继承、覆写 和 虚函数
合理选择液压滑环密封间隙的重要性
Bit operation bit or
sed 技巧
The interviewer asked me how the order ID was generated? Is it not MySQL self incrementing primary key?