osanseviero
commited on
Commit
·
1b17997
1
Parent(s):
753e50b
Update pipeline.py
Browse files- pipeline.py +1 -2
pipeline.py
CHANGED
@@ -23,10 +23,9 @@ class PreTrainedPipeline():
|
|
23 |
A :obj:`PIL.Image`. The raw image representation as PIL.
|
24 |
"""
|
25 |
class_vector = one_hot_from_names([inputs], batch_size=1)
|
26 |
-
if class_vector == None:
|
27 |
raise ValueError("Input is not in ImageNet")
|
28 |
|
29 |
-
|
30 |
noise_vector = truncated_noise_sample(truncation=self.truncation, batch_size=1)
|
31 |
|
32 |
noise_vector = torch.from_numpy(noise_vector)
|
|
|
23 |
A :obj:`PIL.Image`. The raw image representation as PIL.
|
24 |
"""
|
25 |
class_vector = one_hot_from_names([inputs], batch_size=1)
|
26 |
+
if type(class_vector) == type(None):
|
27 |
raise ValueError("Input is not in ImageNet")
|
28 |
|
|
|
29 |
noise_vector = truncated_noise_sample(truncation=self.truncation, batch_size=1)
|
30 |
|
31 |
noise_vector = torch.from_numpy(noise_vector)
|