mirror of
https://github.com/openai/CLIP.git
synced 2026-04-29 11:51:15 +00:00
np.float is removed in numpy 1.24 (#315)
This commit is contained in:
@@ -186,7 +186,7 @@ classifier.fit(train_features, train_labels)
|
|||||||
|
|
||||||
# Evaluate using the logistic regression classifier
|
# Evaluate using the logistic regression classifier
|
||||||
predictions = classifier.predict(test_features)
|
predictions = classifier.predict(test_features)
|
||||||
accuracy = np.mean((test_labels == predictions).astype(np.float)) * 100.
|
accuracy = np.mean((test_labels == predictions).astype(float)) * 100.
|
||||||
print(f"Accuracy = {accuracy:.3f}")
|
print(f"Accuracy = {accuracy:.3f}")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user