Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update visualized results #1426

Merged
merged 20 commits into from
Dec 15, 2020
Merged
Changes from 1 commit
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
Next Next commit
set use_shared_momery as False when eval
  • Loading branch information
LDOUBLEV committed Dec 11, 2020
commit 493a71711c03b44f9abc322c720bb9cd98d5aa62
5 changes: 4 additions & 1 deletion ppocr/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ def build_dataloader(config, mode, device, logger):
drop_last = loader_config['drop_last']
num_workers = loader_config['num_workers']

use_shared_memory = False
if mode == "Train":
#Distribute data to multiple cards
batch_sampler = DistributedBatchSampler(
dataset=dataset,
batch_size=batch_size,
shuffle=False,
drop_last=drop_last)
use_shared_memory = True
else:
#Distribute data to single card
batch_sampler = BatchSampler(
Expand All @@ -87,6 +89,7 @@ def build_dataloader(config, mode, device, logger):
batch_sampler=batch_sampler,
places=device,
num_workers=num_workers,
return_list=True)
return_list=True,
use_shared_memory=use_shared_memory)

return data_loader