|
|
@ -71,7 +71,7 @@ class ErnieSATSampler(BatchSampler):
|
|
|
|
assert isinstance(drop_last, bool), \
|
|
|
|
assert isinstance(drop_last, bool), \
|
|
|
|
"drop_last should be a boolean number"
|
|
|
|
"drop_last should be a boolean number"
|
|
|
|
|
|
|
|
|
|
|
|
from paddle.fluid.dygraph.parallel import ParallelEnv
|
|
|
|
from paddle.distributed import ParallelEnv
|
|
|
|
|
|
|
|
|
|
|
|
if num_replicas is not None:
|
|
|
|
if num_replicas is not None:
|
|
|
|
assert isinstance(num_replicas, int) and num_replicas > 0, \
|
|
|
|
assert isinstance(num_replicas, int) and num_replicas > 0, \
|
|
|
|