address warning; read only
Browse files- experimental/clip_app.py +1 -0
experimental/clip_app.py
CHANGED
@@ -97,6 +97,7 @@ class CLIPTransform:
|
|
97 |
shape = tuple([1, 3, 224, 224])
|
98 |
|
99 |
tensor_numpy = np.frombuffer(tensor_bytes, dtype=dtype_numpy).reshape(shape)
|
|
|
100 |
tensor = torch.from_numpy(tensor_numpy)
|
101 |
prepro = tensor.to(self.device)
|
102 |
embeddings = self.preprocessed_image_to_emdeddings(prepro)
|
|
|
97 |
shape = tuple([1, 3, 224, 224])
|
98 |
|
99 |
tensor_numpy = np.frombuffer(tensor_bytes, dtype=dtype_numpy).reshape(shape)
|
100 |
+
tensor_numpy = np.require(tensor_numpy, requirements='W')
|
101 |
tensor = torch.from_numpy(tensor_numpy)
|
102 |
prepro = tensor.to(self.device)
|
103 |
embeddings = self.preprocessed_image_to_emdeddings(prepro)
|