kvmemnn small change
@@ -198,6 +198,8 @@ class KvmemnnAgent(Agent):
agent.add_argument('--interactive-mode',
default=False, type='bool',
choices=[True, False])
+ agent.add_argument('--loadcands', type='bool', default=True,
+ help='Load candidates to rank from .candspair files, or not.')
def __init__(self, opt, shared=None):
"""Set up model if shared params not set, otherwise no work to do."""
@@ -255,7 +257,7 @@ class KvmemnnAgent(Agent):
self.fixedCands = False
self.fixedX = None
path = opt['model_file'] + '.candspair'
- if os.path.isfile(path):
+ if os.path.isfile(path) and opt.get('loadcands') != False:
print("[loading candidates: " + path + "*]")
fc = load_cands(path)
fcs = []
