shared_library('nnstreamer_filter_tensorflow',
nnstreamer_filter_tf_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_tf_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_tensorflow',
nnstreamer_filter_tf_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_tf_deps,
install: true,
install_dir: nnstreamer_libdir
shared_library('nnstreamer_filter_tensorflow-lite',
nnstreamer_filter_tflite_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_tflite_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_tensorflow-lite',
nnstreamer_filter_tflite_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_tflite_deps,
install: true,
install_dir: nnstreamer_libdir
shared_library('nnstreamer_filter_pytorch',
nnstreamer_filter_torch_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_torch_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_pytorch',
nnstreamer_filter_torch_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_torch_deps,
install: true,
install_dir: nnstreamer_libdir
shared_library('nnstreamer_filter_caffe2',
nnstreamer_filter_caffe2_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_caffe2_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_caffe2',
nnstreamer_filter_caffe2_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_caffe2_deps,
install: true,
install_dir: nnstreamer_libdir
shared_library('nnstreamer_filter_python2',
nnstreamer_filter_python_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_python_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_python2',
nnstreamer_filter_python_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_python_deps,
install: true,
install_dir: nnstreamer_libdir
shared_library('nnstreamer_filter_python3',
nnstreamer_filter_python_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_python_deps,
install: true,
install_dir: filter_subplugin_install_dir
static_library('nnstreamer_filter_python3',
nnstreamer_filter_python_sources,
- cpp_args: ['-Wno-sign-compare'],
dependencies: nnstreamer_filter_python_deps,
install: true,
install_dir: nnstreamer_libdir
int
Caffe2Core::run (const GstTensorMemory * input, GstTensorMemory * output)
{
- int i;
+ unsigned int i;
#if (DBG)
gint64 start_time = g_get_real_time ();
#endif
g_assert (param);
inputTensorMeta.num_tensors = in_info->num_tensors;
- for (int i = 0; i < in_info->num_tensors; i++) {
+ for (unsigned int i = 0; i < in_info->num_tensors; i++) {
PyObject *shape = PyTensorShape_New (&in_info->info[i]);
assert (shape);
core_obj, (char*) "setInputDim", (char*) "(O)", param);
/** dereference input param */
- for (int i = 0; i < in_info->num_tensors; i++) {
+ for (unsigned int i = 0; i < in_info->num_tensors; i++) {
PyObject *shape = PyList_GetItem(param, (Py_ssize_t) i);
Py_XDECREF (shape);
}
info->num_tensors = PyList_Size(result);
- for (int i = 0; i < info->num_tensors; i++) {
+ for (unsigned int i = 0; i < info->num_tensors; i++) {
/** don't own the reference */
PyObject *tensor_shape = PyList_GetItem(result, (Py_ssize_t) i);
g_assert(tensor_shape);
Py_LOCK();
PyObject *param = PyList_New(0);
- for (int i = 0; i < inputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < inputTensorMeta.num_tensors; i++) {
/** create a Numpy array wrapper (1-D) for NNS tensor data */
npy_intp input_dims[] = {(npy_intp) input[i].size};
PyObject *input_array = PyArray_SimpleNewFromData(
PyObject *result = PyObject_CallMethod(core_obj, (char*) "invoke", (char*) "(O)", param);
if (result) {
- g_assert(PyList_Size(result) == outputTensorMeta.num_tensors);
+ g_assert((unsigned int) PyList_Size(result) == outputTensorMeta.num_tensors);
- for (int i = 0; i < outputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < outputTensorMeta.num_tensors; i++) {
PyArrayObject* output_array = (PyArrayObject*) PyList_GetItem(result, (Py_ssize_t) i);
/** type/size checking */
if (checkTensorType(&output[i], output_array) &&
}
/** dereference input param */
- for (int i = 0; i < inputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < inputTensorMeta.num_tensors; i++) {
PyObject *input_array = PyList_GetItem(param, (Py_ssize_t) i);
Py_XDECREF (input_array);
}
int
TFCore::validateTensor (const GstTensorsInfo * tensorInfo, int is_input)
{
- for (int i = 0; i < tensorInfo->num_tensors; i++) {
+ for (unsigned int i = 0; i < tensorInfo->num_tensors; i++) {
/* set the name of tensor */
TF_Operation *op = TF_GraphOperationByName (graph, tensorInfo->info[i].name);
int ret = 0;
/* create input tensor for the graph from `input` */
- for (int i = 0; i < inputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < inputTensorMeta.num_tensors; i++) {
TF_Tensor* in_tensor = nullptr;
TF_Output input_op = {
TF_GraphOperationByName (graph, inputTensorMeta.info[i].name), 0
}
/* create output tensor for the graph from `output` */
- for (int i = 0; i < outputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < outputTensorMeta.num_tensors; i++) {
TF_Output output_op = {
TF_GraphOperationByName (graph, outputTensorMeta.info[i].name), 0
};
goto failed;
}
- for (int i = 0; i < outputTensorMeta.num_tensors; i++) {
+ for (unsigned int i = 0; i < outputTensorMeta.num_tensors; i++) {
output[i].data = TF_TensorData (output_tensors[i]);
outputTensorMap.insert (std::make_pair (output[i].data, output_tensors[i]));
}
failed:
- for (int i = 0; i < input_tensors.size(); i++) {
+ for (unsigned int i = 0; i < input_tensors.size(); i++) {
TF_DeleteTensor (input_tensors[i]);
}
TfLiteTensor *tensor_ptr;
TfLiteStatus status;
- for (int i = 0; i < outputTensorMeta.num_tensors; ++i) {
+ for (unsigned int i = 0; i < outputTensorMeta.num_tensors; ++i) {
tensor_idx = interpreter->outputs ()[i];
tensor_ptr = interpreter->tensor (tensor_idx);
tensors_idx.push_back (tensor_idx);
}
- for (int i = 0; i < inputTensorMeta.num_tensors; ++i) {
+ for (unsigned int i = 0; i < inputTensorMeta.num_tensors; ++i) {
tensor_idx = interpreter->inputs ()[i];
tensor_ptr = interpreter->tensor (tensor_idx);
{
tensorMeta->num_tensors = tensor_idx_list.size ();
- for (int i = 0; i < tensorMeta->num_tensors; ++i) {
+ for (unsigned int i = 0; i < tensorMeta->num_tensors; ++i) {
if (getTensorDim (tensor_idx_list[i], tensorMeta->info[i].dimension)) {
g_critical ("failed to get the dimension of input tensors");
return -1;
if (info->num_tensors != input_idx_list.size ())
return -EINVAL;
- for (int tensor_idx = 0; tensor_idx < info->num_tensors; ++tensor_idx) {
+ for (unsigned int tensor_idx = 0; tensor_idx < info->num_tensors; ++tensor_idx) {
tensor_type tf_type;
const GstTensorInfo *tensor_info;
int input_rank;