当前位置:网站首页>Pycharm uses CONDA to call the remote server
Pycharm uses CONDA to call the remote server
2022-07-28 09:51:00 【@Little snail】
Catalog
- PyCharm How to delete items completely
- window Of powershell install conda Link remote , And create the environment
- 1、 ImportError: cannot import name ‘BatchNormalization‘ from ‘keras.layers.normalization‘
- 2、FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. from pandas import MultiIndex, Int64Index
- 3、Error! C:\Users\18437\jupyterProjectsTotalNPL\ Fudan University Chinese text classification corpus .xlsx is not UTF-8 encodedSaving disabled.
- 4、SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
- 5、ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.
- 6、tensorflow call GPU
- 7、Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
- 8、 Douban mirror image Fast installation
- 9、pytorch install GPU
- 10、TensorFlow call GPU
- 11、 Configuration environment
- 12、 There is not enough video memory
- 13、tensorflow1 edition GPU
- 14、gitgit
PyCharm How to delete items completely
https://www.pycharm.com.cn/t/62
pycharm





home—>dll—>annacoda3—>bin—>python3.9
window Of powershell install conda Link remote , And create the environment
# Log on to remote
ssh user name @ website -p port
conda info -e
# Creating a virtual environment
conda create -n name_pycharm python=3.9# establish
conda activate name_pycharm# Activate
conda install jupyter# Just 、 Download Software in virtual environment
conda list# see
jupyter notebook# start-up
1、 ImportError: cannot import name ‘BatchNormalization‘ from ‘keras.layers.normalization‘
Version of the problem
Solution : take from keras.layers.normalization import BatchNormalization
Change to from keras.layers.normalization.batch_normalization_v1 import BatchNormalization
2、FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. from pandas import MultiIndex, Int64Index
pip install --upgrade pandas
3、Error! C:\Users\18437\jupyterProjectsTotalNPL\ Fudan University Chinese text classification corpus .xlsx is not UTF-8 encodedSaving disabled.
resolvent :
Whether it's txt The file or csv The file has such a problem , The solution is the same :
** Right click on the file - Open it in Notepad - Save as - Notice the bottom of the window – choice UTF-8 Coding format - preservation .
**.
https://www.php.cn/topic/excel/455341.html#:~:text=excel%E8%AE%BE%E7%BD%AE%E6%88%90,%E5%9B%9E%E4%BF%9D%E5%AD%98%E6%96%87%E4%BB%B6%E5%8D%B3%E5%8F%AF%E3%80%82
4、SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape
https://www.cnblogs.com/rychh/p/9743864.html
There are three ways to summarize :
One : Replace with absolute path
func1("C:\\Users\\renyc")
Two : Explicitly declare that the string does not need to be escaped ( Add r)
func1(r"C:\Users\renyc")
3、 ... and : Use Linux The path of /
func1("C:/Users/renyc")
5、ImportError: Missing optional dependency ‘openpyxl’. Use pip or conda to install openpyxl.
pip install openpyxl
6、tensorflow call GPU
Environmental installation
First of all, I'll turn it on anaconda Inside Anaconda powershell prompt
# Create a virtual environment inside tensorflowMy
conda create -n tensorflowMy python=3.9
# Activate the virtual environment
conda activate tensorflowMy
# install cudatoolkit
conda install cudatoolkit -c conda-forge
# install cudnn
conda install cudnn -c conda-forge
# Download in the virtual environment tensorflow package
pip install tensorflow
# Download in the virtual environment keras package
pip install keras
Code calls
import os
import tensorflow as tf
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
gpus = tf.config.list_physical_devices("GPU")
# View using GPU still CPU:
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
# see GPU Usage rate : Execute at the terminal nvidia-smi
7、Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
Through online search , This is generally due to GPU The cause of insufficient video memory , My solution is to reduce it directly batch_size Size , take batch_size The value of the original 16 Revised to 8, It can run normally
8、 Douban mirror image Fast installation
pip install -i https://pypi.douban.com/simple < Packages that need to be installed >
such as :
pip install -i https://pypi.douban.com/simple requests
tensorflow 2.5.0
pip install -i https://pypi.douban.com/simple grpcio==1.34.0
pip install -i https://pypi.douban.com/simple h5py==3.1.0
pip install -i https://pypi.douban.com/simple numpy==1.19.2
pip install -i https://pypi.douban.com/simple six==1.15.0
pip install -i https://pypi.douban.com/simple tensorflow-estimator==2.5.0
pip install -i https://pypi.douban.com/simple typing-extensions==3.7.4
pip install -i https://pypi.douban.com/simple wrapt==1.12.1
9、pytorch install GPU
python:3.8.5
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
(pytorch_envs) C:\Users\Fishc>python
Python 3.8.12 (default, Oct 12 2021, 03:01:40) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'1.10.2'
>>>torch.cuda.is_available()
10、TensorFlow call GPU
Install in the virtual environment tensorflow2.9.0+keras2.9.0+cudnn8.2.1.32+cudatoolkit11.4.2+python3.9
First of all, I'll turn it on anaconda Inside Anaconda powershell prompt
Create a virtual environment inside tensorflowMy
conda create -n tensorflowMy python=3.6
Activate the virtual environment
conda activate tensorflowMy
pip install tensorflow-gpu==1.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
install cudatoolkit
conda install cudatoolkit -c conda-forge
install cudnn
conda install cudnn -c conda-forge
Download in the virtual environment tensorflow package
pip install tensorflow
Download in the virtual environment keras package
pip install keras
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '/gpu:0'
# The key to this sentence
import time
# View using GPU still CPU:
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
11、 Configuration environment
# Create an environment
conda create -n rebot python=3.6
conda activate rebot
# Installation package
# Upgrade instruction
python -m pip install --upgrade pip
conda install jupyter
pip install tornado==4.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tensorflow==1.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
#(tensorflow 2.0 There will be no tensorflow.contrib)
pip list
12、 There is not enough video memory
import tensorflow as tf
import os
os.environ["CUDA_VISIBLE_DEVICES"] = '0' # Specify the first block GPU You can use
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.5 # The program can only occupy the specified space at most gpu50% Explicit memory of
config.gpu_options.allow_growth = True # The program requests memory on demand
sess = tf.Session(config = config)
13、tensorflow1 edition GPU
conda create -n robot python=3.6
conda activate robot
conda install jupyter
python -m pip install --upgrade pip
pip install tornado==4.4.3 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install tensorflow-gpu==1.12 -i https://pypi.tuna.tsinghua.edu.cn/simple
conda install cudatoolkit=9.0
conda install cudnn=7.3
pip install numpy==1.16.0
import tensorflow as tf
tf.test.is_gpu_available()
14、gitgit
Start using our and interface gitgit-lfs
If you need to create a model repository from the command line ( If you create a repository from a website , Then skip )
pip install huggingface_hub
Or use transformers-cli if you have transformers
huggingface-cli login
Log in using the same credentials as huggingface.co/join
Create a model repo from the CLI if needed
huggingface-cli repo create model_name
Clone the model locally
Make sure you have git-lfs installed
(https://git-lfs.github.com)
git lfs install
git clone https://huggingface.co/username/model_name
Then add , Submit and push weights , Word splitter and configuration
save files via `.save_pretrained()` or move them here
git add .
git commit -m "commit from $USER"
git push
then , Your model will be accessed through its identifier : user name /model_name
Anyone can load it from the code :
tokenizer = AutoTokenizer.from_pretrained("username/model_name")
model = AutoModel.from_pretrained("username/model_name")
边栏推荐
- 软件测试与质量学习笔记2----黑盒测试
- Domain events and integration events are not so big
- JS array is de duplicated, the ID is the same, and a value is added and merged
- Translation recommendation | debugging bookkeeper protocol - unbounded ledger
- Source code analysis of activityrouter
- Deepin 下安装 LAMP
- (iros 2022) monocular visual inertial odometer based on event camera
- Can multithreading optimize program performance?
- Symbolic operation of MATLAB
- With frequent data leakage and deletion events, how should enterprises build a security defense line?
猜你喜欢

领域事件和集成事件没那么高大上

SeekTiger生态通证STI 新进展,4月14日登录 ZB

Pulse style | exclusive interview with Committee -- Tencent engineer Zhang Dawei calls you to eat "crab"

IJCAI 2022 | the latest overview of graph structure learning: research progress and future prospects

业务可视化-让你的流程图'Run'起来(4.实际业务场景测试)

Some problems about CLR GC tuning

【日志】日志干什么的?日志工厂是什么?log4j 的配置和使用? log4j.properties 文件配置、log4j jar包坐标

How promise instance solves hell callback
Edge团队详解如何通过磁盘缓存压缩技术提升综合性能体验

这款微信插件太好用了
随机推荐
matlab基本操作
备受关注的Bit.Store,最新动态一览
Source code analysis of view event distribution mechanism
在Plato Farm新经济模型下,如何在游戏中获取更多MARK
Common tool functions are constantly updated
Window source code analysis (III): window update mechanism
对象到对象映射-AutoMapper
刚获融资的Espresso Systems,知识产权与团队道德双双陷入困境
Window source code analysis (IV): window deletion mechanism
C countdown tool
软件测试与质量学习笔记2----黑盒测试
Arouter source code analysis (II)
3 minutes to tell you how to become a hacker | zero foundation to hacker getting started guide, you only need to master these five abilities
老板:公司系统太多,能不能实现账号互通?
Symbolic operation of MATLAB
Basic operation of MATLAB
能够遍历一个文件夹下的所有文件和子文件夹
TimeBasedRollingPolicy简介说明
Sequence and limit operation of MATLAB
Introduction to shardingsphere's concept of sub database and sub table (2)