sohojoe commited on
Commit
1a2c8bd
1 Parent(s): 781e740

address warning; read only

Browse files
Files changed (1) hide show
  1. 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)