NoteOnMe博客平台搭建
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
351 B

  1. import tensorflow as tf
  2. import numpy as np
  3. sess = tf.Session()
  4. inputs = tf.placeholder(dtype=tf.float32, shape=(1, 300, 300, 3))
  5. net = tf.layers.Conv2D(filters=2, kernel_size=3)(inputs)
  6. net = tf.nn.softmax(net, axis=-1)
  7. sess.run(tf.global_variables_initializer())
  8. sess.run(net, feed_dict={inputs: np.zeros(shape=(1, 300, 300, 3), dtype=np.float32)})