python
LearningNews
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PyCharm更改C盘.PyCharm配置文件夹存储位置
更改C盘.PyCharm配置文件夹存储位置 在启动 PyCharm 后选择 Help -> Edit Custom Properties 的选项,弹出: 选择 Create ,之后在文件中添加配置文件新的存储位置即可,例如: idea.config.path=D:/Program Files/.PyCharm/config idea.system.path=D:/Program Files/.PyCharm/system 最后将原文件夹下的 C:\Users\<username>\.P原创 2021-12-11 10:21:41 · 5425 阅读 · 0 评论 -
python-批量letterbox_resize图片
import numpy as np import cv2 import os def 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 · 1200 阅读 · 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 · 1984 阅读 · 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 · 1008 阅读 · 0 评论 -
python:ubuntu下安装tensorflow-gpu并自动配置cuda及cudnn
conda create --name my_tf python=3.6 tensorflow-gpu=1.14 cuda及cudnn会自动配置完成。 以上命令执行完毕后激活环境,继续安装其他库如:opencv等原创 2020-08-14 20:41:05 · 308 阅读 · 0 评论 -
python:cifar10的data_batch_1提取为png图片
import cv2 import numpy as np file = 'data_batch_1' def unpickle(file): import pickle with open(file, 'rb') as fo: dict = pickle.load(fo,encoding='latin1') return dict dict1 = unpickle(file) for i in range(1000):#我只保存的100张 img = dic原创 2020-08-08 20:39:32 · 1435 阅读 · 0 评论 -
python:4维list及numpy单位矩阵和零矩阵的for循环实现
零矩阵 n = 2 #第一维 m = 3 #第二维 k = 4 #第三维 l = 2 #第三维 matrix = [None] * n for i in range(len(matrix)): matrix[i] = [0] * m for i in range(n): for j in range(m): matrix[i][j] = [0] * k for i in range(n): for j in range(m): for x in原创 2020-07-25 10:29:48 · 1560 阅读 · 0 评论
分享