blob: 9ecd9b8f2cf4fce8397c1c0076bdd00f12c1e6ad (
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
|
// 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) {}
ConstantValue::UP create(const vespalib::string &path, const vespalib::string &type) const override;
};
} // namespace vespalib::eval
} // namespace vespalib
|