1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

python: better Python 3 support

This commit is contained in:
Alexander Alekhin
2018-05-11 13:29:28 +03:00
parent df02fe0615
commit 78f205ffa5
7 changed files with 30 additions and 17 deletions
@@ -1,10 +1,14 @@
from __future__ import print_function
import sys
import argparse
import cv2 as cv
import tensorflow as tf
import numpy as np
import struct
if sys.version_info > (3,):
long = int
from tensorflow.python.tools import optimize_for_inference_lib
from tensorflow.tools.graph_transforms import TransformGraph
from tensorflow.core.framework.node_def_pb2 import NodeDef