tensorflow-python学习过程中遇到的问题

  • from __future__ import absolute_import的作用:

https://blog.csdn.net/caiqiiqi/article/details/51050800

  • from __future__ import division的作用:

https://www.cnblogs.com/zhangqigao/archive/2016/12/13/6172147.html

  • from __future__ import print_function的作用:

https://blog.csdn.net/xiaotao_1/article/details/79460365

  • 查看已安装tensorflow版本和路径,查看Python路径:

https://blog.csdn.net/qq_25973779/article/details/80197082

  • 如何看待tensorflow新出的eager模式?

https://www.zhihu.com/question/67471378/answer/253549074

 TF通过计算图将计算的定义和执行分隔开, 这是一种声明式(declaretive)的编程模型。

import tensorflow as tf
import tensorflow.contrib.eager as tfe
tfe.enable_eager_execution()

就开启了Eager模式,这时,TensorFlow会从原先的声明式(declarative)编程形式变成命令式(imperative)编程形式。当写下语句"c = tf.matmul(a, b)"后(以及其他任何tf开头的函数),就会直接执行相应的操作并得到值,而不再像之前那样,生成一个Tensor,通过sess.run()才能拿到值。注意:这种Eager模式一旦被开启就不能被关闭。

  • Tensorflow的中的常量、变量和数据类型:

https://www.cnblogs.com/tengge/p/6360946.html

  • 有关a.shape:

import numpy
a = numpy.array([[00,01,02],
                 [10,11,12]])
print a.shape
print a.shape[0]
print a.shape[1]
---------------------------
输出:
(2,3)  #行数,列数组成的二元组
2
3
  • 深度学习中的iteration、batch-size、epoch:

https://www.zhihu.com/question/43673341

比如你有1000个数据,这个数据集可能太大了,全部跑一次再调参很慢,于是可以分成100个为一个数据集,这样有10份。

batch_size=100

这100个数据组成的数据集叫batch

每跑完一个batch都要更新参数,这个过程叫一个iteration

epoch指的就是跑完这10个batch(10个iteration)的这个过程

猜你喜欢

转载自blog.csdn.net/zhyue77yuyi/article/details/88527578