-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
In diffuser/models/diffusion.py, the following block of code seems to fail when running python scripts/train.py --dataset maze2d-medium-v1.
x = xp1
xr = 2*1/(self.norm_maxs[1] - self.norm_mins[1])
yr = 2*1/(self.norm_maxs[0] - self.norm_mins[0])
off_x = 2*(5.8-0.5 - self.norm_mins[1])/(self.norm_maxs[1] - self.norm_mins[1]) - 1
off_y = 2*(5-0.5 - self.norm_mins[0])/(self.norm_maxs[0] - self.norm_mins[0]) - 1
b = ((x[:,2:3] - off_y)/yr)**2 + ((x[:,3:4] - off_x)/xr)**2 - 1
self.safe1 = torch.min(b[:,0])
xr = 2*1/(self.norm_maxs[1] - self.norm_mins[1])
yr = 2*1/(self.norm_maxs[0] - self.norm_mins[0])
off_x = 2*(5.3-0.5 - self.norm_mins[1])/(self.norm_maxs[1] - self.norm_mins[1]) - 1
off_y = 2*(2-0.5 - self.norm_mins[0])/(self.norm_maxs[0] - self.norm_mins[0]) - 1
b = ((x[:,2:3] - off_y)/yr)**4 + ((x[:,3:4] - off_x)/xr)**4 - 1
self.safe2 = torch.min(b[:,0])
The error seems to be that the int object is not subscriptable.
Quick print statement debugging finds that:
Type of norm_maxs: <class 'int'>
Value of norm_maxs: 0
Type of norm_mins: <class 'int'>
Value of norm_mins: 0
Is this error replicable on your end? If so, what is the fix?
Metadata
Metadata
Assignees
Labels
No labels