Commit 2ba60c20 authored by Vikram Waradpande's avatar Vikram Waradpande
Browse files

Add APP embeds for other dims

parent 57044984
......@@ -222,9 +222,9 @@ class Environment:
emb_path1 = EMBEDPATH + str(args.embedpath1)
emb_path2 = EMBEDPATH + str(args.embedpath2)
self.model1 = KeyedVectors.load_word2vec_format(
emb_path, binary=False)
emb_path1, binary=False)
self.model2 = KeyedVectors.load_word2vec_format(
emb_path, binary=False)
emb_path2, binary=False)
def _create_map(self, row_number, col_number):
map = np.ones(shape=(row_number, col_number))
......@@ -387,14 +387,15 @@ class Environment:
if mode == STATE_VALID:
return -0.01
def generate_embedding(self):
def generate_embedding(self):
state = self.cs
embed = np.zeros(2*self.dimension)
embed[:self.dimension] = self.model1[str(state)]
embed[self.dimension:] = self.model2[str(state)]
return embed
def generate_embeddings_custom(self,state):
def generate_embeddings_custom(self,state):
temp = self.cs
state = state
embed = np.zeros(2*self.dimension)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment