blob: c90ff611934baf8c0321c2320605cd8c2e8c2b7e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "constant_value.h"
#include <vespa/vespalib/stllike/string.h>
namespace vespalib {
namespace eval {
/**
* A ConstantValueFactory that will load constant tensor values from
* file. The file is expected to be in json format with the same
* structure used when feeding.
**/
class ConstantTensorLoader : public ConstantValueFactory
{
private:
const ValueBuilderFactory &_factory;
public:
ConstantTensorLoader(const ValueBuilderFactory &factory) : _factory(factory) {}
~ConstantTensorLoader();
ConstantValue::UP create(const vespalib::string &path, const vespalib::string &type) const override;
};
} // namespace vespalib::eval
} // namespace vespalib
|