Skip to content

Commit

Permalink
recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
a3magic3pocket committed Mar 9, 2023
1 parent c8de73b commit 022a849
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def __getitem__(self, index):
buf.seek(0)
try:
img = Image.open(buf).convert('L')
img.save(f"/content/drive/MyDrive/weights/crnn/qwerasdf{index}.jpg")
except IOError:
print('Corrupted image for %d' % index)
return self[index + 1]
Expand All @@ -60,7 +59,6 @@ def __getitem__(self, index):

label_key = 'label-%09d' % index
label = txn.get(label_key.encode()).decode('utf-8')
print(label, 'label')

if self.target_transform is not None:
label = self.target_transform(label)
Expand Down
4 changes: 0 additions & 4 deletions my_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ def trainBatch(net, criterion, optimizer):
global length
data = next(train_iter)
cpu_images, cpu_texts = data
print('cpu_images', cpu_images)
import sys
sys.exit(1)

batch_size = cpu_images.size(0)
copied_image = utils.loadData(image, cpu_images)

Expand Down

0 comments on commit 022a849

Please sign in to comment.