We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb2e6fe commit eeff1cfCopy full SHA for eeff1cf
graph_net/torch/utils.py
@@ -221,12 +221,17 @@ def convert_meta_classes_to_tensors(file_path):
221
data_type = getattr(torch, attrs.get("dtype", "torch.float").split(".")[-1])
222
shape = attrs.get("shape", [])
223
224
- if "min_val" in attrs and "max_val" in attrs and data_type in [
225
- torch.int8,
226
- torch.int16,
227
- torch.int32,
228
- torch.int64,
229
- ]:
+ if (
+ "min_val" in attrs
+ and "max_val" in attrs
+ and data_type
+ in [
+ torch.int8,
230
+ torch.int16,
231
+ torch.int32,
232
+ torch.int64,
233
+ ]
234
+ ):
235
min_val = attrs["min_val"]
236
max_val = attrs["max_val"]
237
# torch.randint's upper bound is exclusive, so add 1
0 commit comments