安装该项目

ENV:

Win11

Anaconda

主要参考 https://www.tensorflow.org/install/pip

1. 安装 python 3.9, 在Anaconda 新建一个python 3.9 环境

2. 安装 Cuda driver

3. 安装 Cuda tool kit 11.8

https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_network

4. 在 python 3.9 环境里运行下面的命令

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
# Anything above 2.10 is not supported on the GPU on Windows Native
python -m pip install "tensorflow<2.11"
# Verify the installation:
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"

遇到的问题

1. 用pyinstaller 打包后,运行app.exe, 遇到这个

Traceback (most recent call last):
File "app.py", line 139, in <module>
app.run(debug=True)
File "flask\app.py", line 920, in run
File "werkzeug\serving.py", line 1071, in run_simple
File "werkzeug\serving.py", line 852, in make_server
File "werkzeug\serving.py", line 718, in __init__
File "socket.py", line 544, in fromfd
OSError: [WinError 10038] 在一个非套接字上尝试了一个操作。
[27024] Failed to execute script 'app' due to unhandled exception!

solution:

加 freeze_support

if __name__ == "__main__":
    freeze_support()
    app.run(debug=True)

Ref:

https://docs.python.org/3/library/multiprocessing.html#multiprocessing.freeze_support

2. 解决了#1 问题后,再次运行又遇到了

204/317 [==================>...........] - ETA: 5s - loss: 0.2859 - accuracy: 0.8863Your TensorFlow version is up to date! 2.10.1
206/317 [==================>...........] - ETA: 5s - loss: 0.2836 - accuracy: 0.8874'tensorboard' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

solution:
?

下面的已经deprecated了

1.安装 Python 3.7, 在Anaconda 新建一个python 3.7 环境

2. 安装 VC++ build tool 14.0  以上版本, 我从下面这个link下载的最新版是 17.6.4

https://visualstudio.microsoft.com/visual-cpp-build-tools/

否则会遇到

3. 修改一下 requirement.txt 解决冲突

tensorboard==2.1.0

否则会遇到这个问题

 4.

git clone https://github.com/mustafamerttunali/deep-learning-training-gui.git

cd Deep-Learning-Training-GUI

On your conda terminal: pip install -r requirements.txt

5. 安装成功

6. 运行 python app.py 遇到如下问题

(AI_On_ARM_MCU) E:\projects\202312_ARM_MCU\code\deep-learning-training-gui>python app.py
Traceback (most recent call last):
File "app.py", line 13, in <module>
from flask import Flask, request, jsonify, render_template
File "D:\Users\shuai\anaconda3\envs\AI_On_ARM_MCU\lib\site-packages\flask\__init__.py", line 14, in <module>
from jinja2 import escape
ImportError: cannot import name 'escape' from 'jinja2' (D:\Users\shuai\anaconda3\envs\AI_On_ARM_MCU\lib\site-packages\jinja2\__init__.py)

原因是flask 1.x 依赖escape 但是最新的jinja包里已经没有了对escape的支持(https://stackoverflow.com/questions/71718167/importerror-cannot-import-name-escape-from-jinja2),解决办法是升级flask 到2.x

Flask==2.0
 
 
 
NOTE: TF 2.10 是支持windows OS 上GPU的最后一个版本, 后面TF版本只支持WSL 上GPU了
 

a web app for deep learning - deep-learning-training-gui的更多相关文章

  1. What are some good books/papers for learning deep learning?

    What's the most effective way to get started with deep learning?       29 Answers     Yoshua Bengio, ...

  2. Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.3

    Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.3 http://blog.csdn.net/sunbow0 第二章Deep ...

  3. (转) Learning Deep Learning with Keras

    Learning Deep Learning with Keras Piotr Migdał - blog Projects Articles Publications Resume About Ph ...

  4. (IRCNN)Learning Deep CNN Denoiser Prior for Image Restoration-Kai Zhang

    学习深度CNN去噪先验用于图像恢复(Learning Deep CNN Denoiser Prior for Image Restoration)-Kai Zhang 代码:https://githu ...

  5. Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.1

    Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.1 http://blog.csdn.net/sunbow0 Spark ML ...

  6. Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.2

    Spark MLlib Deep Learning Deep Belief Network (深度学习-深度信念网络)2.2 http://blog.csdn.net/sunbow0 第二章Deep ...

  7. Deep High-Resolution Representation Learning for Human Pose Estimation

    Deep High-Resolution Representation Learning for Human Pose Estimation 2019-08-30 22:05:59 Paper: CV ...

  8. 论文解读《Learning Deep CNN Denoiser Prior for Image Restoration》

    CVPR2017的一篇论文 Learning Deep CNN Denoiser Prior for Image Restoration: 一般的,image restoration(IR)任务旨在从 ...

  9. 论文笔记:(NIPS2017)PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space

    目录 一. 存在的问题 1.提取局部特征的能力 2.点云密度不均问题 二.解决方案 1.改进特征提取方法: (1)采样层(sampling) (2)分组层(grouping) (3)特征提取层(fea ...

  10. A Unified Deep Model of Learning from both Data and Queries for Cardinality Estimation 论文解读(SIGMOD 2021)

    A Unified Deep Model of Learning from both Data and Queries for Cardinality Estimation 论文解读(SIGMOD 2 ...

随机推荐

  1. spring cloud 上云的情况下,Ribbon 客户端负载均衡 与 ALB 服务端负载均衡的选择

    在云环境(例如AWS)中,由于云提供商通常提供强大的负载均衡服务(如AWS的ALB),一般不再需要使用Ribbon这种客户端负载均衡方案.云环境中的负载均衡器通常能够提供更高的可靠性.可扩展性和简化的 ...

  2. springboot 整合 pagehelper

    pom.xml <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pa ...

  3. 教你基于MindSpore用DCGAN生成漫画头像

    本文分享自华为云社区<[昇思25天学习打卡营打卡指南-第二十天]DCGAN生成漫画头像>,作者:JeffDing. DCGAN生成漫画头像 在下面的教程中,我们将通过示例代码说明DCGAN ...

  4. P2918

    [USACO08NOV]Buying Hay S 题意描述 约翰的干草库存已经告罄,他打算为奶牛们采购 H(1 \leq H \leq 50000)H(1≤H≤50000) 磅干草. 他知道 N(1 ...

  5. 洛谷P1747

    这个题被坑麻了,题目居然不给棋盘的范围,评论区居然有人说棋盘是无限大的,我想说的是如果真是这样那么第9个点答案应该是2而不是3,这个棋盘绝对是有大小的. #include<iostream> ...

  6. 妙趣横生:利用Echarts实现SpreadJS引用从属关系的可视化魅力

    最新技术资源(建议收藏) https://www.grapecity.com.cn/resources/ 在金融行业,我们经常会有审计审查的需求,对某个计算结果进行审查,但是这个计算结果可能依赖多个单 ...

  7. NodeJS中Buffer与字符串相互转换时一个值得注意的问题

    什么问题 如果一个Buffer的 toString() 结果为乱码或含有乱码,那么用此字符串以 Buffer.from()方法构造出来的Buffer将与原来的Buffer不相同. 这一点其实很好理解, ...

  8. 制作KubeVirt镜像

    目录 制作KubeVirt镜像 1. 准备磁盘文件 2. 编写Dockerfile 3. 构建镜像 4. 上传镜像到仓库(可选) 5. 导出镜像 6. 虚拟机yaml文件 7. 启动虚拟机 8. 启动 ...

  9. windows10 idea springboot项目部署

    windows10 idea springboot项目部署 一,springboot项目 本次项目在原项目的基础之上进行了二次开发:添加了index.html页面 根据配置文件配置数据库 先创建数据库 ...

  10. Java---杂记

    1. 当System.out.println()方法的参数是Object类型时,println()方法会自动调用Object对象的toString()方法,然后显示toString()方法返回的字符串 ...