Open dallasfoster opened 6 months ago
In makani/models/model_package.py the class ModelWrapper has the following lines:
makani/models/model_package.py
ModelWrapper
if self.add_zenith: lon_grid, lat_grid = np.meshgrid(self.lons, self.lats) cosz = cos_zenith_angle(time, lon_grid, lat_grid) cosz = cosz.astype(np.float32) z = torch.from_numpy(cosz).to(device=x.device) while z.ndim != x.ndim: z = z[None] x = torch.cat([x, z], dim=1)
If x.size(0) != 1 then this will fail. Consider a line closer to this:
x.size(0) != 1
z = z.repeat(x.shape[0], *[1 for i in range(x.ndim - 1)])
In
makani/models/model_package.py
the classModelWrapper
has the following lines:If
x.size(0) != 1
then this will fail. Consider a line closer to this: