<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[hello_program_world的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/hello_program_world</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; hello_program_world]]></copyright><item><title><![CDATA[pytorch 神经网络初始化方式]]></title><link>https://blog.csdn.net/hello_program_world/article/details/120326533</link><guid>https://blog.csdn.net/hello_program_world/article/details/120326533</guid><author>hello_program_world</author><pubDate>Thu, 16 Sep 2021 12:44:55 +0800</pubDate><description><![CDATA[神经网络的参数初始化和批量归一化 - Hiidiot - 博客园

关于参数随机初始化问题的补充 - 知乎

pytorch中的参数初始化方法总结_ys1305的博客-CSDN博客_pytorch参数初始化
]]></description><category></category></item><item><title><![CDATA[PyTorch中的view的用法]]></title><link>https://blog.csdn.net/hello_program_world/article/details/120014642</link><guid>https://blog.csdn.net/hello_program_world/article/details/120014642</guid><author>hello_program_world</author><pubDate>Tue, 31 Aug 2021 11:55:35 +0800</pubDate><description><![CDATA[在PyTorch中view函数作用为重构张量的维度，相当于numpy中的resize()的功能，但是用法不太一样





import torch
tt1=torch.tensor([-0.3623,-0.6115,0.7283,0.4699,2.3261,0.1599])


则tt1.size()为torch.Size([6])，是一个一行的tensor。现在通过view可以将其重构一下形状。




result=tt1.view(3,2)
result





tensor([[-0.3623.]]></description><category></category></item><item><title><![CDATA[torch.Tensor的4种乘法]]></title><link>https://blog.csdn.net/hello_program_world/article/details/119566662</link><guid>https://blog.csdn.net/hello_program_world/article/details/119566662</guid><author>hello_program_world</author><pubDate>Tue, 10 Aug 2021 11:51:40 +0800</pubDate><description><![CDATA[torch.Tensor的4种乘法
torch.Tensor有4种常见的乘法：*, torch.mul, torch.mm, torch.matmul. 本文抛砖引玉，简单叙述一下这4种乘法的区别，具体使用还是要参照官方文档。

点乘
a与b做*乘法，原则是如果a与b的size不同，则以某种方式将a或b进行复制，使得复制后的a和b的size相同，然后再将a和b做element-wise的乘法。

下面以*标量和*一维向量为例展示上述过程。

* 标量
Tensor与标量k做*乘法的结果是Tensor的每个元]]></description><category></category></item><item><title><![CDATA[Numpy怎样给数组增加一个维度 _]]></title><link>https://blog.csdn.net/hello_program_world/article/details/119417863</link><guid>https://blog.csdn.net/hello_program_world/article/details/119417863</guid><author>hello_program_world</author><pubDate>Thu, 05 Aug 2021 14:48:59 +0800</pubDate><description><![CDATA[Numpy怎样给数组增加一个维度

背景：
很多数据计算都是二维或三维的，对于一维的数据输入为了形状匹配，经常需升维变成二维

需要：
在不改变数据的情况下，添加数组维度；（注意观察这个例子，维度变了，但数据不变）
原始数组：一维数组arr=[1,2,3,4]，其shape是(4, )，取值分别为arr[0],arr[1],arr[2],arr[3]
变形数组：二维数组arr[[1,2,3,4]]，其shape实(1,4), 取值分别为a[0,0],a[0,1],a[0,2],a[0,3]

实操：
经常需]]></description><category></category></item><item><title><![CDATA[强化学习中的epoch是什么意思]]></title><link>https://blog.csdn.net/hello_program_world/article/details/119145923</link><guid>https://blog.csdn.net/hello_program_world/article/details/119145923</guid><author>hello_program_world</author><pubDate>Tue, 27 Jul 2021 15:52:17 +0800</pubDate><description><![CDATA[转自deepAI

https://deepai.org/machine-learning-glossary-and-terms/epoch

What is an Epoch?

In terms of artificialneural networks, an epoch refers to one cycle through the full training dataset. Usually, training a neural network takes more than a few epoc.]]></description><category></category></item><item><title><![CDATA[shell中各种括号()、(())、[]、[[]]、{}的作用和区别]]></title><link>https://blog.csdn.net/hello_program_world/article/details/118999971</link><guid>https://blog.csdn.net/hello_program_world/article/details/118999971</guid><author>hello_program_world</author><pubDate>Thu, 22 Jul 2021 15:18:23 +0800</pubDate><description><![CDATA[$()和 ` ` 
在 bash shell 中，$( ) 与` ` (反引号) 都可用做命令替换用。

例如 

version=$(uname -r)和version=`uname -r`都可以是version得到内核的版本号

各自的优缺点：
1. ` ` 基本上可用在全部的 unix shell 中使用，若写成 shell script ，其移植性比较高，但反单引号容易打错或看错。

2. $()并不是所有shell都支持。


${ }
${ }用于变量替换。一般情况下，$var 与${...]]></description><category></category></item><item><title><![CDATA[Python numpy模块中transpose函数以及swapaxes函数用法]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117416170</link><guid>https://blog.csdn.net/hello_program_world/article/details/117416170</guid><author>hello_program_world</author><pubDate>Mon, 31 May 2021 14:41:17 +0800</pubDate><description><![CDATA[一、前言
众所周知，python的numpy模块在数据分析中占有重要的地位，因其所定义的 ndarray（n-dimensional array，多维数组）对象比之python基本类库所定义的 list 对象而言，具有更高的灵活性和更广的适用范围。更重要的是，由于numpy模块是用C语言编写的，因此计算机在处理 ndarray 对象时的速度要远快于 list 对象。看一个例子：


&gt;&gt; import numpy as np
  my_arr = np.arrange(1000000)
...]]></description><category></category></item><item><title><![CDATA[反向传播——通俗易懂]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117380548</link><guid>https://blog.csdn.net/hello_program_world/article/details/117380548</guid><author>hello_program_world</author><pubDate>Sat, 29 May 2021 11:10:55 +0800</pubDate><description><![CDATA[最近在看深度学习的东西，一开始看的吴恩达的UFLDL教程，有中文版就直接看了，后来发现有些地方总是不是很明确，又去看英文版，然后又找了些资料看，才发现，中文版的译者在翻译的时候会对省略的公式推导过程进行补充，但是补充的又是错的，难怪觉得有问题。反向传播法其实是神经网络的基础了，但是很多人在学的时候总是会遇到一些问题，或者看到大篇的公式觉得好像很难就退缩了，其实不难，就是一个链式求导法则反复用。如果不想看公式，可以直接把数值带进去，实际的计算一下，体会一下这个过程之后再来推导公式，这样就会觉得很容易了。

　]]></description><category></category></item><item><title><![CDATA[Python Counter()计数工具]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117329999</link><guid>https://blog.csdn.net/hello_program_world/article/details/117329999</guid><author>hello_program_world</author><pubDate>Thu, 27 May 2021 15:30:47 +0800</pubDate><description><![CDATA[class collections.Counter([iterable-or-mapping])

Counter是实现的dict的一个子类，可以用来方便地计数。

例子

举个计数的例子，需要统计一个文件中，每个单词出现的次数。实现方法如下


# 普通青年
d = {}
with open('/etc/passwd') as f:
    for line in f:
        for word in line.strip().split(':'):
            if word ...]]></description><category></category></item><item><title><![CDATA[PYTHON3中REDUCE函数的使用]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117307703</link><guid>https://blog.csdn.net/hello_program_world/article/details/117307703</guid><author>hello_program_world</author><pubDate>Wed, 26 May 2021 22:58:38 +0800</pubDate><description><![CDATA[在python3中如果使用reduce需要先导入

from functools import reduce

reduce函数，reduce函数会对参数序列中元素进行累积。

reduce函数的定义：
reduce(function, sequence [, initial] ) -&gt; value
function参数是一个有两个参数的函数，reduce依次从sequence中取一个元素，和上一次调用function的结果做参数再次调用function。
第一次调用function时，如果提供ini]]></description><category></category></item><item><title><![CDATA[快慢指针的概念及其应用]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117267192</link><guid>https://blog.csdn.net/hello_program_world/article/details/117267192</guid><author>hello_program_world</author><pubDate>Tue, 25 May 2021 23:43:38 +0800</pubDate><description><![CDATA[https://blog.csdn.net/hopegrace/article/details/96612831

https://www.yuque.com/u2728/code-basis/brd5dm
]]></description><category></category></item><item><title><![CDATA[python 实现矩阵旋转]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117214411</link><guid>https://blog.csdn.net/hello_program_world/article/details/117214411</guid><author>hello_program_world</author><pubDate>Mon, 24 May 2021 08:42:27 +0800</pubDate><description><![CDATA[今天做了一道 leetcode 关于矩阵旋转(rotate-image，点击可查看原题)的题目，自己写了一种解法(基于Python)，网上也看到一些比较好的解决方式，借此做一个总结。

阅读本文可能需要 5-8 分钟

题意分析

题目是英文的，但是看这个题目英文理解起来也不是很困难。关键词： 1、matrix: 矩阵 2、2D matrix: 二维矩阵 3、rotate: 旋转 4、clockwise: 顺时针 5、90 degrees: 90度

即：我们需要将一个二维矩阵顺时针旋转90度。 理解题意之]]></description><category></category></item><item><title><![CDATA[序列解包（for x,y in zip(keys, values):）详解。]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117213260</link><guid>https://blog.csdn.net/hello_program_world/article/details/117213260</guid><author>hello_program_world</author><pubDate>Mon, 24 May 2021 07:58:58 +0800</pubDate><description><![CDATA[序列解包（for x,y in zip(keys, values):）详解。

序列解包是一个非常重要和常用的一个功能，使用序列解包可以用非常简洁的方法完成复杂的功能。增强代码的可读性，减少代码量。

1.使用序列解包对多个变量同时进行赋值。


a, b, c = 1, 2, 3
print(a, b, c)

test_tuple = (False, 3.5, 'test')
d, e, f = test_tuple
print(d, e, f)

x, y, z = map(str, range(3)]]></description><category></category></item><item><title><![CDATA[Python3 序列解包  *]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117213082</link><guid>https://blog.csdn.net/hello_program_world/article/details/117213082</guid><author>hello_program_world</author><pubDate>Mon, 24 May 2021 07:52:36 +0800</pubDate><description><![CDATA[Python 中有很多很实用的语法糖，这些语法糖可以帮助我们简化代码、更易理解等优点，接下里再看一个 Python3 中特别实用的语法序列解包（序列解包是 Python 3.0 之后才有的语法）。

那什么是序列解包呢？先看一个例子：


&gt;&gt;&gt; a, b, c = 1, 2, 3
&gt;&gt;&gt; a
1
&gt;&gt;&gt; b
2
&gt;&gt;&gt; c
3
&gt;&gt;&gt;
这种方法并不限于列表和元组，而是适用于任意序列类型（甚至包括字符串和字节序列）。.]]></description><category></category></item><item><title><![CDATA[Python中的zip()的用法]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117200805</link><guid>https://blog.csdn.net/hello_program_world/article/details/117200805</guid><author>hello_program_world</author><pubDate>Sun, 23 May 2021 21:15:52 +0800</pubDate><description><![CDATA[https://blog.csdn.net/chengcheng95588/article/details/78784781




]]></description><category></category></item><item><title><![CDATA[python list 与 String 互相转换]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117093678</link><guid>https://blog.csdn.net/hello_program_world/article/details/117093678</guid><author>hello_program_world</author><pubDate>Thu, 20 May 2021 23:15:05 +0800</pubDate><description><![CDATA[1 str0 = '127.0.0.1'
 2 
 3 list0 = str0.split('.')
 4 
 5 print(list0)
 6 
 7 #['127', '0', '0', '1']
 8 
 9 10 str1 = '#'.join(list0)
11 
12  #127#0#0#1





1、list转str

假设有一个名为test_list的list，转换后的str名为test_str

则转换方法：

test_str = "".join(test_list)
...]]></description><category></category></item><item><title><![CDATA[Python - 判断list是否为空]]></title><link>https://blog.csdn.net/hello_program_world/article/details/117036113</link><guid>https://blog.csdn.net/hello_program_world/article/details/117036113</guid><author>hello_program_world</author><pubDate>Wed, 19 May 2021 17:01:04 +0800</pubDate><description><![CDATA[Python中判断list是否为空有以下两种方式：

方式一：



1 list_temp = []
2 if len(list_temp):
3     # 存在值即为真
4 else:
5     # list_temp是空的


方式二：



1 list_temp = []
2 if list_temp:
3     # 存在值即为真
4 else:
5     # list_temp是空的



以上两种方法均可以判断出 list_temp 列表是否是空列表，第二个方法要优于第一个方法，在Py]]></description><category></category></item><item><title><![CDATA[python collections模块详解]]></title><link>https://blog.csdn.net/hello_program_world/article/details/116807299</link><guid>https://blog.csdn.net/hello_program_world/article/details/116807299</guid><author>hello_program_world</author><pubDate>Fri, 14 May 2021 21:43:52 +0800</pubDate><description><![CDATA[https://www.cnblogs.com/dahu-daqing/p/7040490.html
]]></description><category></category></item><item><title><![CDATA[LeetCode刷题值得推荐的几个Python库]]></title><link>https://blog.csdn.net/hello_program_world/article/details/116806439</link><guid>https://blog.csdn.net/hello_program_world/article/details/116806439</guid><author>hello_program_world</author><pubDate>Fri, 14 May 2021 21:18:43 +0800</pubDate><description><![CDATA[https://blog.csdn.net/weixin_43352942/article/details/102882517
]]></description><category></category></item><item><title><![CDATA[Python中collections模块的使用]]></title><link>https://blog.csdn.net/hello_program_world/article/details/116806361</link><guid>https://blog.csdn.net/hello_program_world/article/details/116806361</guid><author>hello_program_world</author><pubDate>Fri, 14 May 2021 21:16:16 +0800</pubDate><description><![CDATA[本文将详细讲解collections模块中的所有类，和每个类中的方法，从源码和性能的角度剖析。

一个模块主要用来干嘛，有哪些类可以使用，看__init__.py就知道


'''This module implements specialized container datatypes providing
alternatives to Python's general purpose built-in containers, dict,
list, set, and tuple.

* namedtup]]></description><category></category></item></channel></rss>