Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions model/build_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
content_hash = chars.replace(" ", "").replace("\n", "")
content_hash = hashlib.sha256(content_hash.encode('utf-8')).hexdigest()

if len(eval_set) == evaluation_samples_number:
if len(eval_set) >= evaluation_samples_number:
train_set.append(path)
else:
is_unique = True
Expand All @@ -76,8 +76,6 @@

hashes.append(content_hash)

assert len(eval_set) == evaluation_samples_number
assert len(train_set) == training_samples_number

if not os.path.exists("{}/{}".format(os.path.dirname(input_path), EVALUATION_SET_NAME)):
os.makedirs("{}/{}".format(os.path.dirname(input_path), EVALUATION_SET_NAME))
Expand Down
2 changes: 0 additions & 2 deletions model/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from __future__ import absolute_import
__author__ = 'Tony Beltramelli - www.tonybeltramelli.com'

import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

import sys

Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Keras==2.1.2
numpy==1.13.3
opencv-python==3.3.0.10
h5py==2.7.1
tensorflow==1.4.0
Keras==2.13.1
numpy==1.23.5
opencv-python==4.9.0.80
h5py==3.10.0
tensorflow==2.2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as of Apr 2, 2024, I found these libraries to be useable.

Keras==3.0.0
numpy==1.23.5
opencv-python==4.9.0.80
h5py==3.10.0
tensorflow==2.16.1