<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[刘明的博客]]></title><description><![CDATA[记录我的点点滴滴]]></description><link>https://blog.youkuaiyun.com/fisherming</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; fisherming]]></copyright><item><title><![CDATA[广告基本术语]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/116903243</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/116903243</guid><author>fisherming</author><pubDate>Sun, 16 May 2021 21:18:41 +0800</pubDate><description><![CDATA[1、CPC(Cost Per Click) ，每点击成本，是一种点击付费广告，根据广告被点击的次数收费。
2、CPM(Cost Per Mille) ，每千人成本，是一种展示付费广告，只要展示了广告主的广告内容，广告主就为此付费。
3、OCPC(optimization cost per click)，目标转化出价功能，采用更科学的转化率预估机制的准确性，可帮助广告主在获取更多优质流量的同时提高转化完成率。
4、CVR(Conversion Rate)，转化率，是一个衡量CPA广告效果的指标，简言之就是用户]]></description><category></category></item><item><title><![CDATA[python中初始化二维数组]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/115303556</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/115303556</guid><author>fisherming</author><pubDate>Mon, 29 Mar 2021 15:54:58 +0800</pubDate><description><![CDATA[Python中初始化一个5 x 3每项为0的数组，最好方法是：
multilist = [[0 for col in range(5)] for row in range(3)]

没错，那我们初始化一个二维数组时，是否可以这样做呢：
multi = [[0] * 5] * 3

其实，这样做是不对的，因为[0] * 5是一个一维数组的对象，* 3的话只是把对象的引用复制了3次，比如，我修改multi[0][0]：
multi = [[0] * 5] * 3
multi[0][0] = 'Love Chin]]></description><category></category></item><item><title><![CDATA[【Python 模块学习】NumPy中的维度(dimension)、轴(axis)、秩(rank)的含义]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114897178</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114897178</guid><author>fisherming</author><pubDate>Tue, 16 Mar 2021 20:30:13 +0800</pubDate><description><![CDATA[NumPy的时候，其中最重要的就是学习它的 ndarray 对象，它是多维度的同数据类型的数组。这个和Python自带的列表有较大的区别，列表中的元素类型是可以不相同的，如一个列表中，它可以包含数字、字符、字符串等，而在数组中，它的数据类型是相同的，如都是整型或者浮点型。
为什么Python中已经有了列表之后，在NumPy中还要引进一个数组对象呢？有以下三点可以作为参考，但在本文中不做具体描述：

数组对象可以去掉元素间运算所需的循环，使一维向量更像单个数据
设置专门的数组对象，经过优化，可以提升这类应用.]]></description><category></category></item><item><title><![CDATA[flatten层的作用]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114827976</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114827976</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 13:03:38 +0800</pubDate><description><![CDATA[flatten是用来对数组进行展平操作的，首先我们假设有一张灰度图片，这个图片只有3x3个像素点，分别是从1到9，我们对其进行flatten操作。首先它会把每1行进行分开，然后用第2行接在第1行后面，形成一个新的数组1，2，3，4，5，6，最后再把第3行的7，8，9接在新生成的数组后面形成最终的数组。



接下来我们来验证一下我们的猜想。首先导入numpy包，用它来创建一个3x3的二维数组a，并将a打印出来。
灰色图片是一维的，对其flatten：

我们可以看到，经过flatten操作之后，本来3行的数]]></description><category></category></item><item><title><![CDATA[深入理解transformer源码]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114827728</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114827728</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 12:48:48 +0800</pubDate><description><![CDATA[推荐博客：深入理解transformer源码

]]></description><category></category></item><item><title><![CDATA[RNN & LSTM]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114827612</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114827612</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 12:44:22 +0800</pubDate><description><![CDATA[最近重温RNN，将比较好的博客和做的实例记录下：
RNN &amp; LSTM原理：RNN
实例：

]]></description><category></category></item><item><title><![CDATA[TensorFlow的reduce_sum()函数]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114827282</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114827282</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 12:40:25 +0800</pubDate><description><![CDATA[官方解释：

import tensorflow as tf

# 交叉熵评估代价
cross_entropy = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1]))

上面是TensorFlow官方文档中的函数解释。
其实在reduce_sum()中，是从维度上去考虑的（感觉这个Matlab中数据的概念比较像）

调用 reduce_sum(arg1, arg2) 时，参数arg1即为要求和的数据，arg2有两个取值分]]></description><category></category></item><item><title><![CDATA[CNN卷积神经网络]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114826169</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114826169</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 12:26:41 +0800</pubDate><description><![CDATA[最近重温CNN，对原理细节重新推敲了一遍，网上有很多博客讲解的不错，在此做个总结。
博客
CNN原理，推荐七月的这一篇：CNN笔记：通俗理解卷积神经网络
全连接层的作用：CNN 入门讲解：什么是全连接层（Fully Connected Layer）?
这个知乎专栏写的很不错：卷积神经网络（CNN）入门讲解
按照官方教程实现的实例：卷积神经网络（CNN）
实例
使用keras实现卷积神经网络
定义CNN结构
class CNN(tf.keras.Model):
    def __init__(self):
]]></description><category></category></item><item><title><![CDATA[python 不以科学计数法输出]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114824635</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114824635</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 11:43:36 +0800</pubDate><description><![CDATA[文章目录numpy不以科学计数法输出numpy不以科学计数法输出pandas不以科学计数法输出,最大显示无省略号行列【10*10】print不以科学计数法输出
numpy不以科学计数法输出
numpy不以科学计数法输出
np.set_printoptions(suppress=True)

pandas不以科学计数法输出,最大显示无省略号行列【10*10】
pd.set_option('display.max_columns', 10, 'display.max_rows', 10,'display.flo]]></description><category></category></item><item><title><![CDATA[python的with关键字]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/114820262</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/114820262</guid><author>fisherming</author><pubDate>Mon, 15 Mar 2021 10:51:26 +0800</pubDate><description><![CDATA[文章目录前沿格式原理自定义类应用场景
前沿
with表达式其实是try-finally的简写形式。但是又不是全相同。
格式
"""
格式
with context [as var]:
    pass
"""

其中的context是一个表达式，返回的是一个对象，var用来保存context表达式返回的对象，可以有单个或者多个返回值。
with open('1.txt') as f:
    print(f.read())
    
print(f.closed)

表达式open(‘1.txt’)返回是一]]></description><category></category></item><item><title><![CDATA[Linux系统下一次性杀掉相同名称的进程的方法]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/113762234</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/113762234</guid><author>fisherming</author><pubDate>Mon, 08 Feb 2021 20:43:25 +0800</pubDate><description><![CDATA[需要把 linux 下符合某一项条件的所有进程 kill 掉，这个时候我们需要运用 ps, grep, cut 和 kill 一起操作。
下面给出具体的参考：
ps -ef | grep LOCAL=NO | grep -v grep|cut -c 9-15|xargs kill -9

运行这条命令将会杀掉所有含有关键字"LOCAL=NO"的进程
下面将这条命令作一下简单说明：


管道符"|"用来隔开两个命令，管道符左边命令的输出会作为管道符右边命令的输入。


“ps -ef” 是linux里查看所有]]></description><category></category></item><item><title><![CDATA[shell-判断指定文件中是否包含指定的字符串]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/113700117</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/113700117</guid><author>fisherming</author><pubDate>Fri, 05 Feb 2021 17:03:56 +0800</pubDate><description><![CDATA[来自百度
grep "prod" /home/admin/gitrep/otp/otp-webapp-api/src/main/webapp/WEB-INF/web.xml &gt; /dev/null
if [ $? -eq 0 ]; then
    echo "Found!"
else
    echo "Not found!"
fi

修改后的
if [ `grep -c "prod" /home/admin/gitrep/otp/otp-webapp-api/src/main/webapp/WEB]]></description><category></category></item><item><title><![CDATA[Python的MRO]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/113132713</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/113132713</guid><author>fisherming</author><pubDate>Mon, 25 Jan 2021 19:15:12 +0800</pubDate><description><![CDATA[Python的MRO即Method Resolution Order（方法解析顺序），即在调用方法时，会对当前类以及所有的基类进行一个搜索，以确定该方法之所在，而这个搜索的顺序就是MRO。
在Python2.3之前，MRO的实现是基于DFS的，而在Python2.3以后MRO的实现是基于C3算法（我这里两种算法的具体实现都不详述）。
C3算法最早被提出是用于Lisp的，应用在Python中是为了解决原来基于深度优先搜索算法不满足本地优先级，和单调性的问题。
本地优先级：指声明时父类的顺序，比如C(A,B)，]]></description><category></category></item><item><title><![CDATA[理解Python中super()]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/113131632</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/113131632</guid><author>fisherming</author><pubDate>Mon, 25 Jan 2021 19:01:43 +0800</pubDate><description><![CDATA[1.单继承
在单继承时，super().init()与Base.init()是一样的。super()避免了基类的显式调用。代码如下：

Base.init()

class Base(object):
    def __init__(self):
        print 'Create Base'

class A(Base):
    def __init__(self):
        Base.__init__(self)
        print 'Create A'

A()
# 测试结]]></description><category></category></item><item><title><![CDATA[Jupyter notebook选择conda环境]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/113118064</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/113118064</guid><author>fisherming</author><pubDate>Mon, 25 Jan 2021 16:00:50 +0800</pubDate><description><![CDATA[服务器上配置有多个conda的Python环境，在使用jupyter notebook时需要使用其中的一个环境，但是其默认还是使用系统python环境，因此需要解决这个问题.
解决方案其实很简答，参考这个帖子.
首先，安装nb_conda_kernels包:
conda install nb_conda_kernels

然后在新建notebook时选择相应的环境：

另外还可以对已经存在的notebook更换环境：

问题解决！

...]]></description><category></category></item><item><title><![CDATA[ssh省去重复输入密码]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/112967592</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/112967592</guid><author>fisherming</author><pubDate>Thu, 21 Jan 2021 17:26:03 +0800</pubDate><description><![CDATA[背景介绍why
很多公司都使用静态密码+动态密码的方式登陆跳板机，某些还会强制一个动态密码只能登陆一次，于是我们面临着等一分钟才能登陆一次跳板机，很不方便。本文介绍一种在本机的设置，免除每次输入密码的方法。
方法how
此时我们打开ssh客户端/shell命令行，根目录下有.ssh目录，进入。新建一个config文件，编辑内容如下1：
Host *
ControlPersist yes
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
Compres]]></description><category></category></item><item><title><![CDATA[python生成uuid的方法]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/111875939</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/111875939</guid><author>fisherming</author><pubDate>Mon, 28 Dec 2020 22:02:06 +0800</pubDate><description><![CDATA[UUID（Universally Unique Identifier）是通用唯一识别码，在许多领域用作标识，比如我们常用的数据库也可以用它来作为主键，原理上它是可以对任何东西进行唯一的编码的。作为新手一看到类似varchar(40)这样的主键就觉得有点蒙圈了，字符串型也不能自增啊，这里就应该应用UUID了。数据库一般都有自己的办法生成UUID，但虽然可以用，但这玩意考虑到可读性和有点坑的长度还是尽量不要用这玩意做主键···咳，有点跑题···
&nbsp;&nbsp;&nbsp;&nbsp;下面就简单说明一下]]></description><category></category></item><item><title><![CDATA[tf.argmax()解析]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/110825941</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/110825941</guid><author>fisherming</author><pubDate>Mon, 07 Dec 2020 20:20:45 +0800</pubDate><description><![CDATA[tf.argmax(input,axis)根据axis取值的不同返回每行或者每列最大值的索引。 这个很好理解，只是tf.argmax()的参数让人有些迷惑，比如，tf.argmax(array, 1)和tf.argmax(array, 0)有啥区别呢？ 这里面就涉及到一个概念：axis。上面例子中的1和0就是axis。我先笼统的解释这个问题，设置axis的主要原因是方便我们进行多个维度的计算。
比如：
test = np.array([
[1, 2, 3],
 [2, 3, 4], 
 [5, 4, 3],]]></description><category></category></item><item><title><![CDATA[tensorflow中 tf.reduce_mean函数]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/110824797</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/110824797</guid><author>fisherming</author><pubDate>Mon, 07 Dec 2020 19:43:38 +0800</pubDate><description><![CDATA[tf.reduce_mean 函数用于计算张量tensor沿着指定的数轴（tensor的某一维度）上的平均值，主要用作降维或者计算tensor（图像）的平均值。
reduce_mean(input_tensor,
                axis=None,
                keep_dims=False,
                name=None,
                reduction_indices=None)

第一个参数input_tensor： 输入]]></description><category></category></item><item><title><![CDATA[tf.placeholder() is not compatible with eager execution的解决方法]]></title><link>https://blog.youkuaiyun.com/fisherming/article/details/110824490</link><guid>https://blog.youkuaiyun.com/fisherming/article/details/110824490</guid><author>fisherming</author><pubDate>Mon, 07 Dec 2020 18:43:01 +0800</pubDate><description><![CDATA[最近安装了TensoFlow2.0及以上的版本都发现啊出现这个问题：
RuntimeError: tf.placeholder() is not compatible with eager execution.
这是因为在运行
tf.compat.v1.placeholder(dtype, shape = None, name = None)

的时候急切执行了这条语句，但是我们一般都是在一个Session前先去定义placeholder，但是不会去执行，然后再在Sesion上下文管理器中去传入我们的数据，]]></description><category></category></item></channel></rss>