自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(57)
  • 问答 (1)
  • 收藏
  • 关注

原创 RuntimeError: apex.optimizers.FusedSGD requires cuda extension

RuntimeError: apex.optimizers.FusedSGD requires cuda extension

2022-12-05 15:24:40 1351 1

原创 tf.stack解析

tf.stack解析

2022-11-11 11:35:34 310

原创 tf.shape解析

tf.shape解析

2022-11-11 11:14:46 333

原创 tf.pad解析(参考官方文档)

tf.pad解释

2022-11-10 17:44:33 340

原创 Your connection is not private Attackers might be trying to steal your information from nemertes.lis

Your connection is not private Attackers might be trying to steal your information from nemertes.lis

2022-11-10 16:40:38 592

原创 jinja2.exceptions.UndefinedError: ‘forms.ContactForm object‘ has no attribute ‘hidden_tag‘

把contact.html的{{form.hidden_tag()}}的()去掉。

2022-10-28 12:00:26 474

原创 jinja2.exceptions.UndefinedError: ‘forms.ContactForm object‘ has no attribute ‘hidden_tag‘

把contact.html的{{form.hidden_tag()}}的()去掉。

2022-07-21 11:25:51 472

原创 python 切片 下标 列表

定义一个2x3的二维数组,使用切片方法获取子数组。比如想获取第一维的所有数同时第二维第二个和第三个数得到2x2的数组[[2,3],[5,6]]

2022-05-19 17:22:15 184

原创 python实现yolov3中图像尺寸变化

参考链接:https://zhuanlan.zhihu.com/p/49995236变化函数def letterbox_image(img, inp_dim): """ letterbox_image()将图片按照纵横比进行缩放,将空白部分用(128,128,128)填充,调整图像尺寸 具体而言,此时某个边正好可以等于目标长度,另一边小于等于目标长度 将缩放后的数据拷贝到画布中心,返回完成缩放 """ img_w, img_h = img.shape[1]

2022-05-19 11:46:49 705

原创 python 运算符 // % / **

参考链接:https://www.runoob.com/python/python-operators.html//:取整除,返回商的余数部分(向下取整)5//4 = 15//(-4) = -2%:取模,返回除法的余数/:除**:返回x 的y次幂(x=5,y=4)

2022-05-19 11:15:06 255

原创 numpy.full

numpy.full(shape, fill_value, dtype=None, order=‘C’, *, like=None)Return a new array of given shape and type, filled with fill_value.shape:生成数组的形状fill_value:填充的值返回一个形状为指定shape和类型的数组参考链接:https://numpy.org/doc/stable/reference/generated/numpy.full.html.

2022-05-19 11:01:30 255

原创 python 两个list相加 /extend

+与extend区别相同点:"+"和"extend"都能将两个列表成员拼接到到一起不同点: + : 生成的是一个新列表(id改变)extend : 是将一个列表的成员一个个取出添加到原列表中 , 改变的是原列表的值 , id不变总结:+ 会产生一个新的内存来接收拼接结果,extend不会产生新的内存,直接在原始的c.extend(b)----直接在c的基础上操作,不产生新内存,推荐使用,以节约内存空间原文链接:https://blog.csdn.net/nbxuwentao/article/de.

2022-05-18 14:52:38 1150 1

原创 windows junction创建软链接

junction工具下载链接https://docs.microsoft.com/zh-cn/sysinternals/downloads/junction解压到 C:\Windows\System32创建软链接步骤:1.首先在cmd输入C:\Windows\System32\junction.exe2.有一个弹窗出现,点击agree3.然后创建软链接,命令:junction 目标地址 源地址...

2022-04-08 10:50:56 335

原创 numpy.maximum

逐元素比较两个数组(标量)的最大值https://numpy.org/doc/stable/reference/generated/numpy.maximum.htmlnumpy.maximum(x1, x2, /, out=None, *, where=True, casting=‘same_kind’, order=‘K’, dtype=None, subok=True[, signature, extobj]) = <ufunc ‘maximum’>¶...

2022-04-07 16:14:02 1547

原创 python __getitem__

参考链接https://blog.csdn.net/qq_24805141/article/details/81411775https://zhuanlan.zhihu.com/p/27661382https://www.cnblogs.com/Aiyuqianer/p/14091062.html__getitem__是一种特殊方法(魔术方法),能让对象具有迭代功能。class DataBase: '''Python 3 中的类''' def __init__(self, id,

2022-04-07 10:22:03 830

原创 python long函数

python .long()

2022-04-07 10:01:31 1293

原创 python.get方法

2022-04-06 10:10:30 287

原创 python类的特殊方法-自动调用

参考链接https://cloud.tencent.com/developer/article/1749007

2022-04-06 09:45:00 491

原创 python web开发书籍推荐

记录下选书历程。京东明日科技的python web入门 评价还行

2022-03-21 10:11:15 820

原创 tf.nn.dropout

More precisely: With probability rate elements of x are set to 0. The remaining elements are scaled up by 1.0 / (1 - rate), so that the expected value is preserved.https://www.tensorflow.org/api_docs/python/tf/nn/dropout

2022-01-25 11:28:57 1258

原创 tf.nn.conv3d

https://www.tensorflow.org/api_docs/python/tf/nn/conv3d

2022-01-24 17:48:26 908

原创 tf.sqrt

https://www.tensorflow.org/api_docs/python/tf/math/sqrt

2022-01-24 16:16:30 1236

原创 tf.placeholder

https://blog.csdn.net/TeFuirnever/article/details/88928871

2022-01-24 15:38:10 147

原创 解决H5py的DLL问题:from . import h5 as _h5

pip uninstall h5py在官网上找到对应的h5py包https://pypi.org/project/h5py/2.10.0/#files然后pip3 install E:\download_jxs\h5py-2.10.0-cp38-cp38-win_amd64.whl

2021-12-30 18:29:25 824

原创 Cannot open D:\SoftWare\Anaconda\envs\transformer\Scripts\pip-script.py

检查D:\SoftWare\Anaconda\envs\transformer\Scripts\是否有pip-script.py,没有在网上找一个拷贝到D:\SoftWare\Anaconda\envs\transformer\Scripts\

2021-12-30 18:27:21 814

原创 tensorflow_examples下载失败

pip install --upgrade setuptoolspip install git+git://github.com/tensorflow/examples.git

2021-12-22 14:44:16 775

原创 无重复字符的最长子串 leetcode

官方解题link:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/solution/wu-zhong-fu-zi-fu-de-zui-chang-zi-chuan-by-leetc-2/题目methodclass Solution: def lengthOfLongestSubstring(self, s: str) -> int: if not s:ret

2021-12-08 15:12:14 3639

原创 明明的随机数

my methodn = int(input())n1 = []for _ in range(n): n2 = int(input()) n1.append(n2)n1 = sorted(list(set(n1)))for item in n1: print(item)m = int(input())m1 = []for _ in range(m): m2 = int(input()) m1.append(m2)m1 = sorted(lis.

2021-12-07 18:01:26 48

原创 计算某字符出现次数

my methoda = input()b = input()n = 0for i in range(len(a)): b1 = b.lower() a1 = a[i].lower() c = a1==b1 if c: n = n+1print(n) 别人的count()方法用于统计字符串里某个字符或字符串出现的次数总结:内置方法强呀...

2021-12-07 17:05:21 137

原创 华为即使题库 字符串最后一个单词的长度

我的方法是讨论区的a = input().split(’ ')print(len(a[-1]))使用split方法,以空格为分隔符,将原来的字符串分割成几个子字符串,a[-1]为最后一个子字符串

2021-12-07 16:52:18 41

原创 word embedding tf2.7

官网教程:https://tensorflow.google.cn/text/guide/word_embeddings独热编码作为第一个想法,您可以对词汇表中的每个单词进行“one-hot”编码。比如下面的句子 “The cat sat on the mat”.这个句子中的词库是(cat, mat, on,sat, the ).为了表示每个单词,需要创建跟词库长度一样的零向量,然后在对应单词的下标处置1.如下所示创建长度为5的零向量[0, 0, 0, 0, 0].[1, 0, 0, 0, 0]表示

2021-12-07 16:08:31 176

原创 tf.RaggedTensor

吐槽:看了半天看懂一点官网链接:https://tensorflow.google.cn/api_docs/python/tf/RaggedTensor参考博文:https://blog.csdn.net/jackhh1/article/details/102690290ragged是不规则的意思raggedtensor是不规则的张量没有学习整个文档,对学习到的陈述。举例原来的tensor是[3, 1, 4, 1, 5, 9, 2, 6] row_splits是切分下标。从row_split

2021-12-07 11:09:21 1115

原创 python .rjust()函数解析

.rjust()函数返回一个原字符串右对齐,并使用空格填充至长度width的新字符串。如果指定的长度小于字符串的长度则返回原字符串。r :right 右just:justify 对齐用法:str.rjust(width[, fillchar])其中 width指定填充指定字符后中字符串的总长度fillchar 填充的字符,default为空格(fill 填充 char 字符)...

2021-12-07 10:00:40 2561 1

原创 python all()函数应用

all()函数用于判断给定的可迭代参数iterable中的所有元素是否都为TRUE,如果是 返回TRUE,否则返回FALSE 元素为[‘0’,‘空’,‘None’,‘False’]算false,其余算True等价于:def all(iterable):for element in iterable:if not element:return Falsereturn True空列表/元组 返回为TRUE...

2021-12-06 14:59:01 62

原创 numpy.mean

numpy.mean求均值以mn矩阵为例axis不设置值时 返回mn个数的均值,类型为实数axis=0,压缩行,对各列求均值,返回1n的矩阵axis=1,压缩列,对各行求均值,返回m1的矩阵

2021-12-06 14:58:40 41

原创 indexes与indices区别

indexes与indices均为index的复数形式。“Indices” is originally a Latin plural, while “Indexes” has taken the English way of making plurals, using –s or –es. Though both are still widely used, they take on different usage in their senses. “Indices” is used when refer

2021-12-06 14:24:58 2873

原创 numpy.vstack

v是vertically(垂直的意思),在垂直方向推叠官方链接https://numpy.org/doc/stable/reference/generated/numpy.vstack.html

2021-12-02 15:43:30 3173

原创 np.ma.array解析

其中mask为1时 遮掩,比如将x展开下标为0,2,4,6,8时保持原值,其余–

2021-12-02 10:15:34 283

原创 numpy.sum的用法

axis=1时 按列压缩 (输出为行向量)axis=0时 按行压缩(输出为行向量)参考链接https://blog.csdn.net/leekingsen/article/details/76242244

2021-12-02 10:11:43 1407

原创 numpy.argmax的用法

numpy.argmax返回数组最大值的下标注意 下标为4的6也是最大值 但只返回第一个最大值的下标

2021-11-30 17:55:08 524

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除