首页 > 其他 > 详细

tf.layers.dense

时间:2020-03-27 23:43:54      阅读:63      评论:0      收藏:0      [点我收藏+]

tf.layers.dense:

import tensorflow as tf
batch_size = 5
ones = tf.ones([batch_size,20])
logits = tf.layers.dense(ones,10)
print(logits.get_shape())

import tensorflow as tf
batch_size = 5
ones = tf.ones([batch_size,8,20])
logits = tf.layers.dense(ones,10)
print(logits.get_shape())

import tensorflow as tf
batch_size = 5
ones = tf.ones([batch_size,6,8,20])
logits = tf.layers.dense(ones,10)
print(logits.get_shape())

  结果如下:

‘‘‘
(5, 10)
(5, 8, 10)
(5, 6, 8, 10)
‘‘‘

 

tf.layers.dense

原文:https://www.cnblogs.com/always-fight/p/12585003.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!