044f553509123f128bec16953a05574c0ef131a5,a01_FastText/p6_fastTextB_train_multilabel.py,,main,#Any#,39

Before Change


            for start, end in zip(range(0, number_of_training_data, batch_size),range(batch_size, number_of_training_data, batch_size)):
                if epoch==0 and counter==0:
                    print("trainX[start:end]:",trainX[start:end]) /ǘd-array. each element slength is a 100.
                    print("trainY[start:end]:",trainY[start:end]) //a list,each element is a list.element:may be has 1,2,3,4,5 labels.
                    //print("trainY1999[start:end]:",trainY1999[start:end])
                    train_Y_batch=process_labels(trainY[start:end])
                curr_loss,_=sess.run([fast_text.loss_val,fast_text.train_op],feed_dict={fast_text.sentence:trainX[start:end],

After Change


                print("Epoch %d Validation Loss:%.3f\tValidation Accuracy: %.3f" % (epoch,eval_loss,eval_accuracy)) //,\tValidation Accuracy: %.3f--->eval_acc
                //save model to checkpoint
                print("Going to save checkpoint.")
                save_path=FLAGS.ckpt_dir+"model.ckpt"
                saver.save(sess,save_path,global_step=epoch) //fast_text.epoch_step

        // 5.最后在测试集上做测试,并报告测试准确率 Test
        test_loss, test_acc = do_eval(sess, fast_text, testX, testY,batch_size,index2label) //testY1999
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: brightmart/text_classification
Commit Name: 044f553509123f128bec16953a05574c0ef131a5
Time: 2018-11-18
Author: brightmart@hotmail.com
File Name: a01_FastText/p6_fastTextB_train_multilabel.py
Class Name:
Method Name: main


Project Name: HyperGAN/HyperGAN
Commit Name: 5a69007e1ab2f4c0b4a549c0a2a8cd9701fd8929
Time: 2017-06-28
Author: mikkel@255bits.com
File Name: examples/colorizer.py
Class Name:
Method Name: search


Project Name: dPys/PyNets
Commit Name: b9e5bdd6e23ee782268b7f36e68fe23dd3bba4c5
Time: 2019-07-28
Author: dpisner@utexas.edu
File Name: pynets/registration/reg_utils.py
Class Name:
Method Name: match_target_vox_res