finetunning

Bert fine-tuned for semantic similarity

夙愿已清 提交于 2020-06-08 12:31:33
问题 I would like to apply fine-tuning Bert to calculate semantic similarity between sentences. I search a lot websites, but I almost not found downstream about this. I just found STS benchmark . I wonder if I can use STS benchmark dataset to train a fine-tuning bert model, and apply it to my task. Is it reasonable? As I know, there are a lot method to calculate similarity including cosine similarity, pearson correlation, manhattan distance, etc. How choose for semantic similarity? 回答1: As a

Bert fine-tuned for semantic similarity

南笙酒味 提交于 2020-06-08 12:28:11
问题 I would like to apply fine-tuning Bert to calculate semantic similarity between sentences. I search a lot websites, but I almost not found downstream about this. I just found STS benchmark . I wonder if I can use STS benchmark dataset to train a fine-tuning bert model, and apply it to my task. Is it reasonable? As I know, there are a lot method to calculate similarity including cosine similarity, pearson correlation, manhattan distance, etc. How choose for semantic similarity? 回答1: As a

The added layer must be an instance of class Layer. Found: <tensorflow.python.keras.engine.input_layer.InputLayer>

霸气de小男生 提交于 2020-05-10 07:36:29
问题 I am new to machine learning. I was following this tutorial on fine tuning VGG16 models. The model loaded fine with this code: vgg_model = tensorflow.keras.applications.vgg16.VGG16() but gets this ERROR: TypeError: The added layer must be an instance of class Layer. Found: <tensorflow.python.keras.engine.input_layer.InputLayer object at 0x000001FA104CBB70> When running this code: model = Sequential() for layer in vgg_model.layers[:-1]: model.add(layer) Dependencies: Keras 2.2.3 Tensorflow 1

Keras finetunning InceptionV3 tensor dimension error

社会主义新天地 提交于 2019-12-11 16:56:22
问题 I am trying to finetune a model in Keras: inception_model = InceptionV3(weights=None, include_top=False, input_shape=(150, 150, 1)) x = inception_model.output x = GlobalAveragePooling2D()(x) x = Dense(256, activation='relu', name='fc1')(x) x = Dropout(0.5)(x) predictions = Dense(10, activation='softmax', name='predictions')(x) classifier = Model(inception_model.input, predictions) ####training training training ... save weights classifier.load_weights("saved_weights.h5") classifier.layers.pop

Fine-tuning and transfer learning by the example of YOLO

十年热恋 提交于 2019-12-08 03:15:22
问题 I have a general question regarding fine-tuning and transfer learning, which came up when I tried to figure out how to best get yolo to detect my custom object (being hands). I apologize for the long text possibily containing lots of false information. I would be glad if someone had the patience to read it and help me clear my confusion. After lots of googling, I learned that many people regard fine-tuning to be a sub-class of transfer learning while others believe that they are to different

Wor2vec fine tuning

喜欢而已 提交于 2019-12-06 06:38:09
问题 I am new at working with word2vec. I need to fine tune my word2vec model. I have 2 datasets: data1 and data2 what i did so far is : model = gensim.models.Word2Vec( data1, size=size_v, window=size_w, min_count=min_c, workers=work) model.train(data1, total_examples=len(data1), epochs=epochs) model.train(data2, total_examples=len(data2), epochs=epochs) Is this correct? Do I need to store learned weights somewhere? I checked this answer and this one but I couldn't understand how it's done. Can

Wor2vec fine tuning

怎甘沉沦 提交于 2019-12-04 12:28:24
I am new at working with word2vec. I need to fine tune my word2vec model. I have 2 datasets: data1 and data2 what i did so far is : model = gensim.models.Word2Vec( data1, size=size_v, window=size_w, min_count=min_c, workers=work) model.train(data1, total_examples=len(data1), epochs=epochs) model.train(data2, total_examples=len(data2), epochs=epochs) Is this correct? Do I need to store learned weights somewhere? I checked this answer and this one but I couldn't understand how it's done. Can someone explain to me the steps to follow? Thank you in advance Note you don't need to call train() with