We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 198d04d + 7dd8d46 commit eb247d0Copy full SHA for eb247d0
1 file changed
examples/custom/classify.py
@@ -39,7 +39,10 @@ def main(argv):
39
40
features_file = io.open(args[1], 'r', encoding='utf8')
41
features = features_file.read().strip().split(",")
42
- features = [float(f) for f in features]
+ if '0x' in features[0]:
43
+ features = [float(int(f, 16)) for f in features]
44
+ else:
45
+ features = [float(f) for f in features]
46
47
48
dir_path = os.path.dirname(os.path.realpath(__file__))
0 commit comments