forked from remicres/otbtf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotbTensorflowDataTypeBridge.h
35 lines (24 loc) · 1.14 KB
/
otbTensorflowDataTypeBridge.h
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
28
29
30
31
32
33
34
35
/*=========================================================================
Copyright (c) 2018-2019 Remi Cresson (IRSTEA)
Copyright (c) 2020-2021 Remi Cresson (INRAE)
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef MODULES_REMOTE_OTBTENSOFLOW_INCLUDE_OTBTENSORFLOWDATATYPEBRIDGE_H_
#define MODULES_REMOTE_OTBTENSOFLOW_INCLUDE_OTBTENSORFLOWDATATYPEBRIDGE_H_
#include <typeinfo>
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/framework/tensor.h"
namespace otb {
namespace tf {
// returns the datatype used by tensorflow
template<class Type>
tensorflow::DataType GetTensorflowDataType();
// Return true if the tensor data type is correct
template<class Type>
bool HasSameDataType(const tensorflow::Tensor & tensor);
} // end namespace tf
} // end namespace otb
#include "otbTensorflowDataTypeBridge.cxx"
#endif /* MODULES_REMOTE_OTBTENSOFLOW_INCLUDE_OTBTENSORFLOWDATATYPEBRIDGE_H_ */