Difference between revisions of "TensorFlow: shape"

From OnnoWiki
Jump to navigation Jump to search
(Created page with " python import tensorflow as tf scalar = tf.constant(100) vector = tf.constant([1,2,3,4,5]) matrix = tf.constant([[1,2,3],[4,5,6]]) cube_matrix = tf.constant([[[1],[2]...")
 
 
Line 13: Line 13:
 
  print(cube_matrix.get_shape())
 
  print(cube_matrix.get_shape())
  
 +
scalar.get_shape()
 +
vector.get_shape()
 +
matrix.get_shape()
 +
cube_matrix.get_shape()
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 
* [[TensorFlow]]
 
* [[TensorFlow]]

Latest revision as of 17:29, 29 July 2019

python


import tensorflow as tf
scalar = tf.constant(100)
vector = tf.constant([1,2,3,4,5])
matrix = tf.constant([[1,2,3],[4,5,6]])
cube_matrix = tf.constant([[[1],[2],[3]],[[4],[5],[6]],[[7],[8],[9]]])
print(scalar.get_shape())
print(vector.get_shape())
print(matrix.get_shape())
print(cube_matrix.get_shape())
scalar.get_shape()
vector.get_shape()
matrix.get_shape()
cube_matrix.get_shape()

Pranala Menarik