06 2021 档案
摘要:当前状态: 我们有一个远程仓库和一个本地项目仓库,本地仓库没有配置 git。 现在想将本地仓库中的部分文件作为一个新的分支推送到远端仓库。 Procedures: Set up ".gitignore" file. "git init" in local repo. git checkout -b
阅读全文
摘要:error info: (They can occur at the same time.) tonyyan@tonyyan-X11SPI:~$ nvidia-smi Unable to determine the device handle for GPU 0000:65:00.0: GPU is
阅读全文
摘要:import torchvision.transforms as transforms image = transforms.functional.to_tensor(image) Convert a PIL Image or numpy.ndarray to tensor. This functi
阅读全文
摘要:module not found error, how python interpreter find modules: The directory from which the input script was run, or the current directory if the interp
阅读全文
摘要:import a_module print(a_module.__file__) however: AttributeError: 'module' object has no attribute '__file__' import inspect inspect.getfile(module) s
阅读全文
摘要:Shift + CTRL + F9 = 只更新html CTRL + n = 快速打开类 Shift + CTRL + n = 快速打开文件 CTRL + d = 复制当前所选内容并粘贴到所选区域的后面 alt + insert = 在类中自动生成构造器、getter、setter 等 alt +
阅读全文
摘要:The JAVA_HOME environment variable is not defined correctlyThis environment variable is needed to run this propramJAVA_HOME should point to a JDK not
阅读全文
摘要:torch.onnx.export 时添加参数 training=2,可以将conv和bn 分开显示,否则onnx默认将bn层融合到conv层。 添加training=2 重新生成onnx之后,再次用Netron 查看网络结构: 带有BN层的卷积操作,其卷积的bias 取消掉了,与BN 的beta合
阅读全文
摘要:本文时间:2021-06-24,使用OKhttp 4.9.1 原来的请求方式: OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.github.com
阅读全文
摘要:git commit --amend --no-edit 比如当前有一个提交 git commit -m 'add readme' , 但敲下这条命令才发现,readme中漏写了一行。 这时不需要撤销提交,也不需要新的提交,更改之后使用上述命令即可在同一个提交中追加内容。当然,这仅仅适用于细微的更改
阅读全文
摘要:出错的git命令: git push -u origin main解决方法:git show-ref8c4c7afc8d831dcba4f8989e39eb8286c1657439 refs/heads/master新命令:git push -u origin master成功解决参考:https:
阅读全文
摘要:根据https://spring.io/guides/gs/serving-web-content/ 的步骤,运行后输入http://localhost:8080/hello 或http://localhost:8080/hello?name=sdaa 等 出现错误(网页出现http 500错误):
阅读全文
摘要:检查Windows环境变量,要仔细检查,因为系统变量可能有很多: 可以看到 JAVA_HOME 引用的是 11.0.1版本。 此时再次检查Path变量: 再次注意如果变量路径很多请一定仔细检查,保证只有一个jdk-11.0.1\bin 的Java路径。 我一直出现报错的原因就是之前多了一个 C:\P
阅读全文
摘要:error 1: Unable to open 'raise.c': Unable to read file '/build/glibc-S9d2JN/glibc-2.27/sysdeps/unix/sysv/linux/raise.c' (Error: Unable to resolve non-
阅读全文
摘要:error as follows: [06/17/2021-11:30:13] [E] [TRT] (Unnamed Layer* 88) [ElementWise]: elementwise inputs must have same dimensions or follow broadcast
阅读全文
摘要:find the location: sudo find / -name "libopencv_core.so.4.5" create and add file "/etc/ld.so.conf.d/opencv.conf" /usr/local/lib sudo ldconfig referenc
阅读全文
摘要:If the code is migrated from Windows to Linux, please check if you have also included the .cpp file. If you only include the .hpp header file, the com
阅读全文
摘要:In my case, I got two constants with same name "EPS" in 2 files: a.hpp: enum Type { COUNT=1, //!< the maximum number of iterations or elements to comp
阅读全文
摘要:errors: /home/tonyyan/Documents/main.cpp:108: undefined reference to `cv::VideoCapture::read(cv::_OutputArray const&)' /home/tonyyan/Documents/main.cp
阅读全文
摘要:errors from terminal: /tmp/ccwCifBp.o: In function `nvinfer1::(anonymous namespace)::createInferRuntime(nvinfer1::ILogger&)': /home/tonyyan/Downloads/
阅读全文
摘要:使用 c_cpp_properties.json 配置包含文件/头文件 如果在 .vscode文件夹中没有 c_cpp_properties.json可以使用Ctrl+Shift+P输入并打开 C/C++: Edit Configurations (UI) 此时出现默认的 c_cpp_propert
阅读全文
摘要:一段时间不碰又忘记了,必须写下博客以记之。。 简单来说,none的作用是增加一个维度(和 np.newaxis 等价),... 三个点的意思是省略所有冒号,即代表原来的所有数据。 比如原来的数组维度是 3, 224 ,224, 使用 data [None, ... ] 或者 data [None,
阅读全文
摘要:nums[] 3 4 7 2 -3 1 4 2 preSum[] 0 3 7 14 16 13 14 18 20 差值(k=7) -4 0 7 9 6 7 11 13 计数 1 1 1 1 说明: 原始暴力解的判断语句: for (int i = 1; i <= n; i++) for (int j
阅读全文
摘要:先来看一下官方文档的api简介: TensorRT provides a C++ implementation on all supported platforms, and a Python implementation on Linux. Python is not currently supp
阅读全文
摘要:首先单位是字节,比如 builder.max_workspace_size = 1<< 30 就是 2^30 bytes 即 1 GB。 它的作用是给出模型中任一层能使用的内存上限。运行时,每一层需要多少内存系统分配多少,并不是每次都分 1 GB,但不会超过 1 GB。 One particular
阅读全文
摘要:最近学习CUDA编程,见以下代码:https://github.com/wang-xinyu/tensorrtx/blob/master/lenet/lenet.cpp 其中经常出现一个检查内存分配是否政策的宏函数CHECK: 1 #define CHECK(status) \ 2 do\ 3 {\
阅读全文