博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DL编程遇到的问题,记录下
阅读量:4091 次
发布时间:2019-05-25

本文共 1956 字,大约阅读时间需要 6 分钟。

编程作业遇到的问题

  • scipy.ndimage: submodule dedicated to image processing (n-dimensional images).

  • PIL: The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. This library supports many file formats, and provides powerful image processing and graphics capabilities.

  • d["Y_prediction_test"][0,index]: d is a dictionary

  • test_set_x[:,index].reshape((num_px, num_px, 3))

    • [:,index] 所有的行,index 列(切片)
    • reshape 成图像的样式
  • imshow(): 输出图像

  • In order for Gradient Descent to work you must choose the learning rate wisely. The learning rate α \alpha α determines how rapidly we update the parameters. If the learning rate is too large we may “overshoot” the optimal value. Similarly, if it is too small we will need too many iterations to converge to the best values.

  • %matplotlib inline: 内嵌画图,是 Magic Function,IPython 预先定义好的函数

  • W1 = np.random.randn(n_h, n_x) * 0.01b1 = np.zeros((n_h, 1)) 初始化,注意括号和系数 (0.01)

  • 函数 convert_to_one_hot(Y, C)

    Y = np.eye(C)[Y.reshape(-1)] ,后面的数组表明1偏移的位置
    将离散型特征进行one-hot编码是为了让距离计算更合理

  • tf.transpose() 对二维数组说就是转置

  • eval() 其实就是 tf.TensorSession.run() 的另外一种写法,eval() 只能用于 tf.Tensor 类对象,有输出的 Operation

  • always returns a copy.

  • returns a view of the original array whenever possible. This isn’t visible in the printed output, but if you modify the array returned by ravel, it may modify the entries in the original array. If you modify the entries in an array returned from flatten this will never happen. ravel will often be faster since no memory is copied, but you have to be more careful about modifying the array it returns.

  • numpy.random.permutation(x)

    Randomly permute(重新排列) a sequence, or return a permuted range.
    If x is a multi-dimensional array, it is only shuffled(洗牌) along its first index.

  • np.random,randn() 返回的是正态分布,np.random,rand() 返回的是均匀分布

  • argmax(array, axis=None)

    返回极大值点 Returns the indices of the maximum values along an axis.

  • np.int64(A > 0) ,A中大于0的元素全部转化为1,小于0的元素全部转化为0

  • x1 = np.squeeze(x) 把 x 中维度为1的去掉中括号,序列化

转载地址:http://tudii.baihongyu.com/

你可能感兴趣的文章
ACfly调参记录(包括ACfly-F330和ACfly-T265)
查看>>
一定记得每飞几次或者隔一天要把螺丝和浆帽拧一次,确实会松的
查看>>
《多旋翼无人飞行器嵌入式飞控开发指南》里基于FreeRTOS的无人机软件框架
查看>>
思岚A1的SDK其实很好读懂,每个函数清晰明了,可以直接调用
查看>>
pixhawk(PX4)的一些论坛网站(包括中文版的PX4用户手册和PX4开发手册)
查看>>
串级 PID 为什么外环输出是内环的期望?(和我之前对串级PID的总结一样)
查看>>
我刚刚才完全清楚GPS模块的那根杆子是怎么固定安装好的
查看>>
去github里面找找也没有别人无人机+SLAM的工程
查看>>
PX4与ROS关系以及仿真控制(键盘控制无人机)
查看>>
我对无人机重心高度的理解
查看>>
现在明白为什么无名博客里好几篇文章在讲传感器的滞后
查看>>
实际我看Pixhawk定高模式其实也是飞得很稳,飘得也不厉害
查看>>
Pixhawk解锁常见错误
查看>>
C++的模板化等等的确实比C用起来方便多了
查看>>
ROS是不是可以理解成一个虚拟机,就是操作系统之上的操作系统
查看>>
用STL algorithm轻松解决几道算法面试题
查看>>
ACfly之所以不怕炸机因为它觉得某个传感器数据不安全就立马不用了
查看>>
我发觉,不管是弄ROS OPENCV T265二次开发 SDK开发 caffe PX4 都是用的C++
查看>>
ROS的安装(包含文字和视频教程,我的ROS安装教程以这篇为准)
查看>>
国内有个码云,gitee
查看>>