![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
LearningNews
这个作者很懒,什么都没留下…
展开
-
PyCharm更改C盘.PyCharm配置文件夹存储位置
更改C盘.PyCharm配置文件夹存储位置在启动 PyCharm 后选择 Help -> Edit Custom Properties 的选项,弹出:选择 Create ,之后在文件中添加配置文件新的存储位置即可,例如:idea.config.path=D:/Program Files/.PyCharm/configidea.system.path=D:/Program Files/.PyCharm/system最后将原文件夹下的 C:\Users\<username>\.P原创 2021-12-11 10:21:41 · 4626 阅读 · 0 评论 -
python-批量letterbox_resize图片
import numpy as npimport cv2import osdef letterbox_resize(img, new_width, new_height, interp=0): ''' Letterbox resize. keep the original aspect ratio in the resized image. ''' ori_height, ori_width = img.shape[:2] resize_ratio = mi原创 2020-11-06 22:26:25 · 1012 阅读 · 0 评论 -
ACL2019代码开源论文
来自:GitHub yizhen20133868 WeChat Subscription 程序员遇见GitHub#### Incremental Transformer with Deliberation Decoder for Document Grounded Conversations- 论文链接:https://www.aclweb.org/anthology/P19-1002.pdf- 代码链接: https://github.com/lizekang/ITDD#### Impr转载 2020-08-25 19:16:15 · 1592 阅读 · 1 评论 -
测试GPU是否参与模型训练等运算
import tensorflow as tf# Creates a graph.a = tf.constant([6.0, 5.0, 3.0, 3.0, 2.0, 1.0], shape=[2, 3], name='a')b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2], name='b')c = tf.matmul(a, b)# Creates a session with log_device_placement set原创 2020-08-16 09:39:49 · 790 阅读 · 0 评论 -
python:ubuntu下安装tensorflow-gpu并自动配置cuda及cudnn
conda create --name my_tf python=3.6 tensorflow-gpu=1.14cuda及cudnn会自动配置完成。以上命令执行完毕后激活环境,继续安装其他库如:opencv等原创 2020-08-14 20:41:05 · 212 阅读 · 0 评论 -
python:cifar10的data_batch_1提取为png图片
import cv2import numpy as npfile = 'data_batch_1'def unpickle(file): import pickle with open(file, 'rb') as fo: dict = pickle.load(fo,encoding='latin1') return dictdict1 = unpickle(file)for i in range(1000):#我只保存的100张 img = dic原创 2020-08-08 20:39:32 · 1195 阅读 · 0 评论 -
python:4维list及numpy单位矩阵和零矩阵的for循环实现
零矩阵n = 2 #第一维m = 3 #第二维k = 4 #第三维l = 2 #第三维matrix = [None] * nfor i in range(len(matrix)): matrix[i] = [0] * mfor i in range(n): for j in range(m): matrix[i][j] = [0] * kfor i in range(n): for j in range(m): for x in原创 2020-07-25 10:29:48 · 1405 阅读 · 0 评论