We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self.scores =tf.layers.dense(self.h_drop,num_classes,name='scores',kernel_initializer=tf.contrib.layers.xavier_initializer(),bias_initializer=tf.constant_initializer(0.1)) # W = tf.get_variable( # "W", # shape=[num_filters_total, num_classes], # initializer=tf.contrib.layers.xavier_initializer()) # b = tf.Variable(tf.constant(0.1, shape=[num_classes]), name="b") # l2_loss += tf.nn.l2_loss(W) # l2_loss += tf.nn.l2_loss(b) # print(self.scores.shape) # self.scores = tf.nn.xw_plus_b(self.h_drop, W, b, name="scores") self.predictions = tf.argmax(self.scores, 1, name="predictions") 在这里面被注释的这些,我用开头的一句话tf.layers.dense代替了,这个方法有kernel_regularizer,但是不知道这里的kernel_regularizer会不会加入到loss中去。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: