Skip to content

Commit

Permalink
add match-srnn
Browse files Browse the repository at this point in the history
  • Loading branch information
faneshion committed Apr 7, 2018
1 parent c544db8 commit 73f2538
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/QuoraQP/config/matchsrnn_quoraqp.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"model_type": "PY",
"weights_file": "examples/QuoraQP/weights/matchsrnn.quora.weights",
"save_weights_iters": 20,
"num_iters": 300,
"num_iters": 500,
"display_interval": 10,
"test_weights_iters": 300,
"test_weights_iters": 500,
"optimizer": "adam",
"learning_rate": 0.001
},
Expand Down
2 changes: 1 addition & 1 deletion examples/QuoraQP/run_matchsrnn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ python matchzoo/main.py --phase train --model_file ${currpath}/examples/QuoraQP/

# predict with the model

#python matchzoo/main.py --phase predict --model_file ${currpath}/examples/QuoraQP/config/matchsrnn_quoraqp.config
python matchzoo/main.py --phase predict --model_file ${currpath}/examples/QuoraQP/config/matchsrnn_quoraqp.config
12 changes: 2 additions & 10 deletions matchzoo/models/matchsrnn.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
# -*- coding=utf-8 -*-
import keras
import keras.backend as K
import sys

sys.path.append('../matchzoo/layers/')
# from DynamicMaxPooling import *

import keras
import keras.backend as K
from keras.models import Sequential, Model
from keras.layers import *
from keras.layers import Reshape, Embedding, Merge, Dot
from keras.optimizers import Adam
from model import BasicModel

import sys

sys.path.append('../matchzoo/layers/')
sys.path.append('../matchzoo/utils/')

from layers.DynamicMaxPooling import *
from layers.MatchTensor import *
from layers.SpatialGRU import *
from utils.utility import *
Expand Down

0 comments on commit 73f2538

Please sign in to comment.