Search in sources :

Example 1 with TensorFlowOperation

use of com.yahoo.searchlib.rankingexpression.integration.tensorflow.importer.operations.TensorFlowOperation in project vespa by vespa-engine.

the class TensorFlowImporter method importNode.

private static TensorFlowOperation importNode(String modelName, String nodeName, GraphDef graph, OperationIndex index) {
    if (index.alreadyImported(nodeName)) {
        return index.get(nodeName);
    }
    NodeDef node = getTensorFlowNodeFromGraph(namePartOf(nodeName), graph);
    List<TensorFlowOperation> inputs = importNodeInputs(modelName, node, graph, index);
    TensorFlowOperation operation = OperationMapper.get(modelName, node, inputs, portPartOf(nodeName));
    index.put(nodeName, operation);
    List<TensorFlowOperation> controlInputs = importControlInputs(modelName, node, graph, index);
    if (controlInputs.size() > 0) {
        operation.setControlInputs(controlInputs);
    }
    return operation;
}
Also used : TensorFlowOperation(com.yahoo.searchlib.rankingexpression.integration.tensorflow.importer.operations.TensorFlowOperation) NodeDef(org.tensorflow.framework.NodeDef)

Aggregations

TensorFlowOperation (com.yahoo.searchlib.rankingexpression.integration.tensorflow.importer.operations.TensorFlowOperation)1 NodeDef (org.tensorflow.framework.NodeDef)1