-
Notifications
You must be signed in to change notification settings - Fork 7
/
notes.txt
40 lines (16 loc) · 843 Bytes
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
- View GCN in Tensorboard
- Train TAGCN for small k, c, n
- Build small TAGCN using the data
optimizer = tf.train.AdamOptimizer(learning_rate=FLAGS.learning_rate)
loss += FLAGS.weight_decay * tf.nn.l2_loss(var)
loss += masked_softmax_cross_entropy(self.outputs, self.placeholders['labels'],
self.placeholders['labels_mask'])
accuracy = masked_accuracy(self.outputs, self.placeholders['labels'],
self.placeholders['labels_mask'])
opt_op = optimizer.minimize(self.loss)
# tf.sess
for epoch in range(FLAGS.epochs):
outs = sess.run([opt_op, loss, accuracy], feed_dict=feed_dict)
print("Epoch:", '%04d' % (epoch + 1), "train_loss=", "{:.5f}".format(outs[1]),
"train_acc=", "{:.5f}".format(outs[2]))
#tf.nn.softmax(self.outputs)