Commit
•
1366905
1
Parent(s):
dbfac41
fix: incorrect condition control flow (#261)
Browse files- fix: incorrect condition control flow (4f17a922bf1dbabd36bd805967cc954b448ef000)
Co-authored-by: tpob <[email protected]>
- geneformer/pretrainer.py +1 -1
geneformer/pretrainer.py
CHANGED
@@ -381,7 +381,7 @@ class GeneformerPreCollator(SpecialTokensMixin):
|
|
381 |
return_tensors = "tf" if return_tensors is None else return_tensors
|
382 |
elif is_torch_available() and _is_torch(first_element):
|
383 |
return_tensors = "pt" if return_tensors is None else return_tensors
|
384 |
-
|
385 |
return_tensors = "np" if return_tensors is None else return_tensors
|
386 |
else:
|
387 |
raise ValueError(
|
|
|
381 |
return_tensors = "tf" if return_tensors is None else return_tensors
|
382 |
elif is_torch_available() and _is_torch(first_element):
|
383 |
return_tensors = "pt" if return_tensors is None else return_tensors
|
384 |
+
elif isinstance(first_element, np.ndarray):
|
385 |
return_tensors = "np" if return_tensors is None else return_tensors
|
386 |
else:
|
387 |
raise ValueError(
|