add option to control randomness
This commit is contained in:
parent
f23941953f
commit
a07fc79824
|
|
@ -60,7 +60,7 @@ def floormap_noise_injection(floormap, args):
|
|||
return
|
||||
for i in range(floormap.map.shape[0]):
|
||||
for j in range(floormap.map.shape[1]):
|
||||
if np.random.random() < 0.8:
|
||||
if np.random.random() < (1-args.floormap_rand_prob):
|
||||
continue
|
||||
loss_p, loss_r = floormap.getLoss(i, j)
|
||||
loss_r = np.random.randint(-3, 3) - 10
|
||||
|
|
@ -233,7 +233,14 @@ if __name__ == '__main__':
|
|||
dest='floormap_rand',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='add some random penetration losses in floormap'
|
||||
help='add some random penetration/reflection losses in floormap'
|
||||
)
|
||||
p.add_argument(
|
||||
'--floormap-rand-prob', '-frndprob',
|
||||
dest='floormap_rand_prob',
|
||||
type=float,
|
||||
default=0.2,
|
||||
help='set the probability of adding the randomness'
|
||||
)
|
||||
p.add_argument(
|
||||
'--with-noise',
|
||||
|
|
|
|||
Loading…
Reference in New Issue