- 博客(11)
- 收藏
- 关注
原创 在LaTex中插入代码块
用LaTex写文章或者做笔记时,往往需要在正文中插入代码. 为了使得代码工整、排版整齐,我们会想知道如何在LaTex文档中插入代码块?下面就来总结一下LaTex插入代码的方法.LaTex已经为我们准备了用来插入代码的包:listings包和xcolor包1.listings包这个包是用来插入代码的,如果不需要高亮显示,这个包已经完成了最基本的插入代码任务了. 例如需要插入R代码,用法如下:...
2019-01-24 22:54:25 49346 4
转载 Python中self的用法详解(链接传送)
Python中的self是什么意思?Python新手,今天看了一篇详细易懂的self用法介绍,感觉开了些窍,这里附上链接,以方便复习.Python中self用法详解(转载自CLHugh)...
2019-01-22 20:43:25 3791
原创 Python: numpy.fliplr()
np.fliplr()的作用fliplr()是Numpy库中的函数,作用是将数组在左右方向上翻转.需要注意的是,fliplr()在左右方向上翻转每行的元素,列保持不变,但是列的显示顺序变了.下面我们来看一下github上给出的fliplr()函数的source代码:def fliplr(m): """ Flip array in the left/right directi...
2019-01-19 22:51:51 11578
原创 Python: Shuffle()的作用
shuffle()函数的作用shuffle()的作用是混排序列中的元素,序列中元素顺序改变,但其内容不变.import numpy as npa = np.arange(10)print("a=", a )np.random.shuffle(a)print("After shuffle, a=", a )a= [0 1 2 3 4 5 6 7 8 9]After shuffle,...
2019-01-19 16:57:33 5727
原创 AttributeError: module 'socketio' has no attribute 'Server'
Anaconda 3 + Python 3.5 + Windows 10在Python中运行程序时出现如题所示的报错,错误提示上说问题出在这句代码上:sio = socketio.Server()在github上找到了原因和解决方案,正好是socketio的作者在里面回答的.链接点这里原因一般我们会直接pip安装socketio这个模块,而socketio.Server()这个包在py...
2019-01-17 16:54:33 4132 2
原创 Python: SystemError: Unknown opcode
SystemError: Unknown opcode直接拿别人跑好的模型参数在自己的电脑上运行看结果的时候,容易出现这样的报错,完整的报错通知是这样的:根据提示,可以看到是在加载model的时候出现错误:model = load_model(args.model)为什么load不出来model呢?寻寻觅觅总算get了解决方案,在这里:所以Python 3.5中train出来的...
2019-01-17 16:33:13 11474 6
原创 AttributeError: module 'tensorflow' has no attribute 'python'
AttributeError: module ‘tensorflow’ has no attribute ‘python’ #9在程序中出现以下代码,会报错:AttributeError: module ‘tensorflow’ has no attribute ‘python’import tensorflow as tftf.python.control_flow_ops = tf具...
2019-01-17 15:43:03 7670 5
原创 Error in moviepy setup command: 'extras_require' must be a dictionary whose values are strings or li
Python: error in moviepy setup command: ‘extras_require’ must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.在Python 3.5中,使用命令pip...
2019-01-17 15:19:45 15155 3
原创 Warning: The TensorFlow library wasn't compiled to use SSE,SSE2,SSE3,SSE4.1 instructions
Tensorflow Warning: The TensorFlow library wasn’t compiled to use SSE,SSE2,SSE3,SSE4.1 instructions,but these are available on your machine and could speed up CPU computations.在使用tensorflow时,会一段巨长的wa...
2019-01-13 17:53:24 787 1
原创 Python:Numpy库中的invert()函数的用法
Numpy库中的invert()函数的用法官方解释:Compute bit-wise inversion, or bit-wise NOT, element-wise.Computes the bit-wise NOT of the underlying binary representation of the integers in the input arrays.For signe...
2019-01-13 15:01:50 15221
原创 安装自带python3.6的Anaconda3,并安装tensorflow,导入Pycharm中使用
加粗样式@实验笔记——记录实验中遇到的问题直接安装自带python3.6的Anaconda3,并安装tensorflow,导入Pycharm中使用之前看了很多博客中的教程,讲解如何在anaconda中安装tensorflow,这些教程的大致步骤是:1.下载安装某一版本的anaconda;2.在anaconda中新建一个基于python3.5或者python3.6的tensorflow环境;...
2019-01-12 16:17:47 7386 7
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人