Studying Tensorflow

References

  • LearningTensorFlow.com
  • G?ron, A. (2017). Hands-On Machine Learning with Scikit-Learn and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems.?O’Reilly Media [Amazon]
  • Siraj Raval (2016. 8. 19.). TensorFlow in 5 Minutes. YouTube. [YouTube]
  • TensorBoard: 그래프 시각화 [LINK]
  • Cifar-10 CNN implementation using TensorFlow library with 24% error [GitHub]
Q&A
  • In TensorFlow, what is the difference between Session.run() and Tensor.eval()? | stackoverflow [LINK]

Terms of Tensorflow

  • Variable
    • ≠constant
  • Session
  • Placeholder

Objects in Tensorflow

  • tf.Graph
    • contains tf.Operation and tf.Tensor
  • tf.Operation
  • tf.Tensor
  • tf.constant
  • tf.Variable
  • tf.placeholders
  • tf.Session
  • tf.train.GradientDescentOptimizer
    • __init__(
      learning_rate,
      use_locking=False,
      name=’GradientDescent’
      )
    • minimize(
      loss,
      global_step=None,
      var_list=None,
      gate_gradients=GATE_OP,
      aggregation_method=None,
      colocate_gradients_with_ops=False,
      name=None,
      grad_loss=None
      )

      • loss: A Tensor containing the value to minimize.

Methods in Tensorflow

  • tf.get_default_graph
    • returns a defalut Graph.
  • tf.Graph.as_default
    • returns a context manager that makes this tf.Graph the default graph.
    • If you create a new thread, and wish to use the default graph in that thread, you must explicitly add a with g.as_default(): in that thread’s function.
  • tf.concat
    • Used to concatenate tensors along?a specific axis.
  • tf.truncated_normal
    • return a Tensor whose elements are randomly initialized following a normal distribution you set.
  • tf.matmul(a, b)
    • returns the result of matrix multiplication between two Tensor?a and b.
  • tf.nn.softmax(
    logits,
    dim=-1,
    name=None
    )

    • returns a?Tensor?that has the same type as logits.
    • computes softmax activations.
  • tf.reduce_mean(
    input_tensor,
    axis=None,
    keep_dims=False,
    name=None,
    reduction_indices=None
    )

    • returns the reduced?Tensor that is?the mean of elements across dimensions of input_tensor.
    • is equivalent to np.mean.
  • tf.nn.softmax_cross_entropy_with_logits(
    _sentinel=None,
    labels=None,
    logits=None,
    dim=-1,
    name=None
    )

    • return the computed result of?softmax cross entropy between logits and labels.

Leave a Reply

Your email address will not be published. Required fields are marked *