01 2024 档案

摘要:c#传递两种类型的参数 private void test222(string a, int b) { } c#接收方法的两种类型的值, private (string, int) GetValue() { return ("aa",1); } private void Form1_Load(obj 阅读全文
posted @ 2024-01-31 17:05 txwtech 阅读(55) 评论(0) 推荐(0) 编辑
摘要:PS D:\deep_learning\yolov5-master> D:\anaconda3\envs\pytorch\python.exe train.py --cfg qiqiu.yaml --epoch 10 --batch-size 2 --device cputrain: weights 阅读全文
posted @ 2024-01-29 15:58 txwtech 阅读(244) 评论(2) 推荐(0) 编辑
摘要:里面的文件含义如下: best.pt: 该文件是训练过程中最佳的模型权重参数文件,即validation loss最小的模型。在测试或者推理时,我们可以直接加载该文件来获取最优模型的参数。在weight文件夹中。 hyp.yaml: 该文件包含了模型的超参数,如学习率、权重衰减、数据增强等。我们可以 阅读全文
posted @ 2024-01-29 15:55 txwtech 阅读(349) 评论(0) 推荐(0) 编辑
摘要:鸿蒙系统应用开发app_java(ScrollView)滚动组件 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:ohos="http://schemas.huawei.com/res/ohos" ohos:height ="matc 阅读全文
posted @ 2024-01-27 21:05 txwtech 阅读(31) 评论(0) 推荐(0) 编辑
摘要:https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ 翻译 搜索 复制 阅读全文
posted @ 2024-01-26 09:53 txwtech 阅读(67) 评论(0) 推荐(0) 编辑
摘要:很多新手在使用yolov5训练模型的时候会出现爆内存和爆显存问题,一般就是由于worker和batch_size参数设置过大有关,参考如下是解决的方法。 一、workers train.py中关于workers设置代码如下: workers是指数据装载时cpu所使用的线程数,默认为8,但是按照默认的 阅读全文
posted @ 2024-01-24 16:15 txwtech 阅读(1365) 评论(1) 推荐(0) 编辑
摘要:翻译 搜索 复制 阅读全文
posted @ 2024-01-24 11:42 txwtech 阅读(24) 评论(1) 推荐(0) 编辑
摘要:Ultralytics requirements ['gitpython>=3.1.30', 'scipy>=1.4.1', 'seaborn>=0.11.0'] not found, attempting AutoUpdate... 等待自动更新,下载完毕,就Ok了 yolov5,pytorch 阅读全文
posted @ 2024-01-23 17:23 txwtech 阅读(406) 评论(0) 推荐(0) 编辑
摘要:(base) C:\Users\Administrator>conda activate pytorch (pytorch) C:\Users\Administrator>conda insatll ultralytics CommandNotFoundError: No command 'cond 阅读全文
posted @ 2024-01-23 17:15 txwtech 阅读(364) 评论(0) 推荐(0) 编辑
摘要:检测pytorch是否安装成功,Anaconda Prompt中使用命令import torch和torch.__version__无问题,而cmd不行 翻译 搜索 复制 阅读全文
posted @ 2024-01-23 15:25 txwtech 阅读(45) 评论(1) 推荐(0) 编辑
摘要:anaconda No module named 'torch' 检查python对应版本,选择对应的编译器 步骤1. 步骤2. 步骤,1,2执行两次。第一次3.9,第二次3.8 翻译 搜索 复制 阅读全文
posted @ 2024-01-23 14:51 txwtech 阅读(18) 评论(0) 推荐(0) 编辑
摘要:(pytorch) C:\Users\Administrator>conda install ultralyticsCollecting package metadata (current_repodata.json): doneSolving environment: failed with in 阅读全文
posted @ 2024-01-23 14:46 txwtech 阅读(401) 评论(0) 推荐(0) 编辑
摘要:pip install python-opencv:错误 pip install opencv-python:正确 翻译 搜索 复制 阅读全文
posted @ 2024-01-23 12:02 txwtech 阅读(7) 评论(0) 推荐(0) 编辑
摘要:翻译 搜索 复制 阅读全文
posted @ 2024-01-23 10:58 txwtech 阅读(7) 评论(0) 推荐(0) 编辑
摘要:c# opencvsharp bitmap转mat--mat转bitmap // Mat mat = OpenCvSharp.Extensions.BitmapConverter.ToMat(bitmap); //bitmap转mat // mat = mat.CvtColor(ColorConve 阅读全文
posted @ 2024-01-23 10:18 txwtech 阅读(1106) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u 阅读全文
posted @ 2024-01-14 21:52 txwtech 阅读(136) 评论(1) 推荐(0) 编辑
摘要:https://www.jb51.net/books/837167.html 阅读全文
posted @ 2024-01-13 14:16 txwtech 阅读(208) 评论(0) 推荐(0) 编辑
摘要:在线深度学习 https://zh.d2l.ai/chapter_installation/index.html 阅读全文
posted @ 2024-01-13 14:04 txwtech 阅读(4) 评论(0) 推荐(0) 编辑
摘要:基本的序列和映射协议 类实例化当作字典使用,构造函数初始化参数 序列和映射基本上是元素(item)的集合,要实现它们的基本行为(协议),不可变对象需 要实现2个方法,而可变对象需要实现4个。  __len__(self):这个方法应返回集合包含的项数,对序列来说为元素个数,对映射来说 为键值对数 阅读全文
posted @ 2024-01-10 14:07 txwtech 阅读(15) 评论(0) 推荐(0) 编辑
摘要:55.system.exit()退出-不执行-所在函数方法后续代码,类似c# return 翻译 搜索 复制 阅读全文
posted @ 2024-01-09 13:24 txwtech 阅读(9) 评论(0) 推荐(0) 编辑
摘要:f __name__ == '__main__': print('test211') alist = [1,2,3,4,5,6,7,8,9] blist = list(filter((lambda x:x%2==0),alist)) print(blist) clist = list(map((la 阅读全文
posted @ 2024-01-09 08:42 txwtech 阅读(4) 评论(0) 推荐(0) 编辑
摘要:53.python类的继承与构造函数 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search ever 阅读全文
posted @ 2024-01-08 22:42 txwtech 阅读(15) 评论(0) 推荐(0) 编辑
摘要:pycharm社区版下载方法pycharm-community-2023.3.2.exe https://www.jetbrains.com.cn/ pycharm-community-2023.3.2.exe 阅读全文
posted @ 2024-01-08 21:36 txwtech 阅读(227) 评论(0) 推荐(0) 编辑
摘要:52.python收集参数 def print_params(*params): # *接受元组,一个星号 print(params) def print_params2(tt2, *params): # *接受元组 print(tt2) print(params) def print_params 阅读全文
posted @ 2024-01-07 21:35 txwtech 阅读(8) 评论(0) 推荐(0) 编辑
摘要:employee就是包 导入包,使用时默认调用__init__.py文件 class Employee: __wwid = '' # 两个__下划线表示private私有变量 __name = '' wwid = 'cd987' # public公有变量 def set_wwid(self, wwi 阅读全文
posted @ 2024-01-07 21:18 txwtech 阅读(14) 评论(0) 推荐(0) 编辑
摘要:http://106.14.252.86/index.html usb摄像头测试软件 阅读全文
posted @ 2024-01-07 20:58 txwtech 阅读(2007) 评论(0) 推荐(0) 编辑
摘要:Git提示“warning: LF will be replaced by CRLF,删除对应文件,文件格式不对引起的问题 翻译 搜索 复制 阅读全文
posted @ 2024-01-05 09:27 txwtech 阅读(17) 评论(0) 推荐(0) 编辑
摘要:50.读取ini配置文件与使用日志模块logging记录日志信息保存日志文件 dept.ini [robots] fxl: L223 ttw: L856 ssy: M398 result_msg: this is ini file pii:3.625412 [visions] ll:k566 zel 阅读全文
posted @ 2024-01-04 16:49 txwtech 阅读(78) 评论(0) 推荐(0) 编辑
摘要:mail_list = '123<aa2@163.com>acdef, 123123;<ba1@qq.com>acdef,;w8<aah@163.com>acdef,;dtg<ca@186.com>acdef,;jjdtg<qd@163.com>acdef,;jjtr' print('提取所有邮件地 阅读全文
posted @ 2024-01-04 14:33 txwtech 阅读(289) 评论(0) 推荐(0) 编辑
摘要:Python 正则表达式(RegEx) 在本教程中,您将学习正则表达式(RegEx),并使用Python的re模块与RegEx一起使用(在示例的帮助下)。 正则表达式(RegEx)是定义搜索模式的字符序列。 例如, ^a...s$ 上面的代码定义了RegEx模式。模式是:以a开头并以s结尾的任何五个 阅读全文
posted @ 2024-01-04 10:49 txwtech 阅读(208) 评论(0) 推荐(0) 编辑
摘要:this = chr(ESCAPES[this][1])KeyError: '\\e' re.error: bad escape \e at position 7 错误 正确: 翻译 搜索 复制 阅读全文
posted @ 2024-01-04 09:05 txwtech 阅读(108) 评论(0) 推荐(0) 编辑
摘要:在Python中,脱字符号只在Windows的命令行shell中有效,如果在IDLE或其他文本编辑器中,脱字符号会被忽略,直接当成普通字符处理 要指定排除字符集,可在开头添加一个^字符,例如'[^abc]'与除a、b和c外的其他任何字符都匹配。 翻译 搜索 复制 阅读全文
posted @ 2024-01-04 08:51 txwtech 阅读(42) 评论(0) 推荐(0) 编辑
摘要:Python 获取当前时间 本文中,您将学习获取语言环境的当前时间以及Python中的不同时区。 您可以采用多种方法获取Python当前时间。 示例1:使用datetime对象的当前时间 from datetime import datetime now = datetime.now() curre 阅读全文
posted @ 2024-01-03 21:02 txwtech 阅读(123) 评论(0) 推荐(0) 编辑
摘要:Python Global 关键字 全局关键字简介 在Python中,global关键字允许您在当前作用域之外修改变量。它用于创建全局变量并在局部上下文中对该变量进行更改。 全局关键字规则 Python中global关键字的基本规则是: 当我们在函数内部创建变量时,默认情况下它是局部的。 当我们在函 阅读全文
posted @ 2024-01-03 20:58 txwtech 阅读(82) 评论(0) 推荐(0) 编辑
摘要:Python range() 使用方法及示例 range(start, stop[, step]) 中括号含义:[,step]是第三个参数,可选项 参考 range()参数 range()主要采用三个在两个定义中具有相同用法的参数: start -整数,从该整数开始返回整数序列 stop-要返回整数 阅读全文
posted @ 2024-01-03 20:52 txwtech 阅读(104) 评论(0) 推荐(0) 编辑
摘要:42.python json模块字符串操作_读取写入文件_对象转json字符串转对象相互转换 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press 阅读全文
posted @ 2024-01-03 13:35 txwtech 阅读(23) 评论(0) 推荐(0) 编辑
摘要:python shelve模块写入dat文件保存数据库 # This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to se 阅读全文
posted @ 2024-01-03 11:19 txwtech 阅读(25) 评论(0) 推荐(0) 编辑
摘要:python堆、集合、双端队列 # This is a sample Python script. # 1# 1 # 2# 2 # Press Shift+F10 to execute it or replace it with your code.# 3# 3 # Press Double Shi 阅读全文
posted @ 2024-01-03 10:28 txwtech 阅读(4) 评论(0) 推荐(0) 编辑
摘要:39.python list列表的操作 if __name__ == '__main__': #13#13 #print_hi('PyCharm') #14#14 import fileinput #15#15 #for line in fileinput.input(inplace=True): 阅读全文
posted @ 2024-01-03 09:13 txwtech 阅读(6) 评论(0) 推荐(0) 编辑
摘要:# This is a sample Python script. # Press Shift+F10 to execute it or replace it with your code. # Press Double Shift to search everywhere for classes, 阅读全文
posted @ 2024-01-03 08:40 txwtech 阅读(4) 评论(0) 推荐(0) 编辑
摘要:最外面的引号是由Python本身使用的,而Windows shell看不到它,Windows只理解双引号。 Python将在Windows上将正斜杠转换为反斜杠,因此您可以使用 exe_path = r'C:\Windows\System32\mspaint.exe' exe_path2 = r'" 阅读全文
posted @ 2024-01-02 13:32 txwtech 阅读(289) 评论(0) 推荐(0) 编辑
摘要:if __name__ == '__main__': #print_hi('PyCharm') add_to_log_func('abcdefg') print("read_content:\n", read_file_func()) msg = input('key key for exit... 阅读全文
posted @ 2024-01-02 08:39 txwtech 阅读(22) 评论(0) 推荐(0) 编辑
摘要:python创建目录,判断目录是否存在,存在创建时不会报异常 def add_to_log_func(info): global gl_log_file_name log_directory=os.getcwd()+'\\log\\' #os.getcwd()获取当前所在目录 if not os.p 阅读全文
posted @ 2024-01-02 08:30 txwtech 阅读(63) 评论(0) 推荐(0) 编辑
摘要:python三元运算,c三目运算符使用 age3 = 10print(age3 > 10 if 'ok' else 'false')print('正常' if age3 > 2 else '异常') 阅读全文
posted @ 2024-01-01 21:22 txwtech 阅读(5) 评论(0) 推荐(0) 编辑
摘要:python模块的使用方法_类的创建与调用 eml = employee.Employee() #默认调用模块的__init__.pyemployee文件夹就是模块,与main.py主程序在同一个项目的文件夹main.py # This is a sample Python script. # Pr 阅读全文
posted @ 2024-01-01 21:03 txwtech 阅读(20) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示