Hi, Dr. Guo.I’m confused when I run your codes, there are several details I want to consult you.
Firstly, the class 'emb_classifier' in 'main_multiclass.py' as follows, why you only calculate the most relevant class's embedding in multi_class and what is the significance of y_emb, which you didn't use in following codes?
y_pos = tf.argmax(y, -1) #?
y_emb, W_class = embedding_class(y_pos, opt, 'class_emb') # b * e, c * e
y_emb=tf.cast(y_emb,tf.float32)
W_class=tf.cast(W_class,tf.float32) # c * e
W_class_tran = tf.transpose(W_class, [1,0]) # e * c
Secondly, in the class of 'att_emb_ngram_encoder_cnn' in 'model.py', the input of convolution you designed here absolutely impossible to get the output size of 'b * s * c' and is not the same with your paper. What is your thinking of here for this convolution and the detailed design for padding, kernel, and output?
x_emb_0 = tf.squeeze(x_emb,) # b * s * e
x_emb_1 = tf.multiply(x_emb_0, x_mask) # b * s * e
H = tf.contrib.layers.conv2d(x_emb_0, num_outputs=opt.embed_size,kernel_size=[10], padding='SAME',activation_fn=tf.nn.relu) #b * s * c
Thirdly, why you only calculate the most relevant class as accuracy in your 'main_multiclass.py' as follow? Shouldn't it calculate the whole classes?
correct_prediction = tf.equal(tf.argmax(prob, 1), tf.argmax(y, 1))
Hi, Dr. Guo.I’m confused when I run your codes, there are several details I want to consult you.
Firstly, the class 'emb_classifier' in 'main_multiclass.py' as follows, why you only calculate the most relevant class's embedding in multi_class and what is the significance of y_emb, which you didn't use in following codes?
Secondly, in the class of 'att_emb_ngram_encoder_cnn' in 'model.py', the input of convolution you designed here absolutely impossible to get the output size of 'b * s * c' and is not the same with your paper. What is your thinking of here for this convolution and the detailed design for padding, kernel, and output?
Thirdly, why you only calculate the most relevant class as accuracy in your 'main_multiclass.py' as follow? Shouldn't it calculate the whole classes?
correct_prediction = tf.equal(tf.argmax(prob, 1), tf.argmax(y, 1))