Skip to content
Snippets Groups Projects
Commit 8023999c authored by Franck Dary's avatar Franck Dary
Browse files

DepthLayerTreeEmbedding no longer contains gov

parent d5a1c96e
No related branches found
No related tags found
No related merge requests found
......@@ -70,13 +70,7 @@ void DepthLayerTreeEmbeddingImpl::addToContext(std::vector<std::vector<long>> &
newChilds.insert(newChilds.end(), val.begin(), val.end());
}
childs = newChilds;
if (depth == 0)
{
newChilds.clear();
auto gov = config.has(0,index,0) ? config.getAsFeature(Config::headColName, index).get() : "-1";
newChilds.emplace_back(util::isEmpty(gov) ? "-1" : gov);
newChilds.insert(newChilds.end(), childs.begin(), childs.end());
}
for (int i = 0; i < maxElemPerDepth[depth]; i++)
for (auto & col : columns)
if (i < (int)newChilds.size() and config.has(col, std::stoi(newChilds[i]), 0))
......
......@@ -26,7 +26,7 @@ LSTMNetworkImpl::LSTMNetworkImpl(int nbOutputs, int unknownValueThreshold, std::
if (!treeEmbeddingColumns.empty())
{
hasTreeEmbedding = true;
treeEmbedding = register_module("treeEmbedding", DepthLayerTreeEmbedding(treeEmbeddingNbElems,embeddingsSize,treeEmbeddingSize,treeEmbeddingColumns,treeEmbeddingBuffer,treeEmbeddingStack,lstmOptionsAll));
treeEmbedding = register_module("treeEmbedding", DepthLayerTreeEmbedding(treeEmbeddingNbElems,embeddingsSize,treeEmbeddingSize,treeEmbeddingColumns,treeEmbeddingBuffer,treeEmbeddingStack,lstmOptions));
treeEmbedding->setFirstInputIndex(currentInputSize);
currentOutputSize += treeEmbedding->getOutputSize();
currentInputSize += treeEmbedding->getInputSize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment