- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for alexnet (0.09 sec)
-
docs_src/path_params/tutorial005.py
from fastapi import FastAPI class ModelName(str, Enum): alexnet = "alexnet" resnet = "resnet" lenet = "lenet" app = FastAPI() @app.get("/models/{model_name}") async def get_model(model_name: ModelName): if model_name is ModelName.alexnet: return {"model_name": model_name, "message": "Deep Learning FTW!"} if model_name.value == "lenet":
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:26:03 UTC 2022 - 546 bytes - Viewed (0) -
tests/test_tutorial/test_path_params/test_tutorial005.py
def test_get_enums_alexnet(): response = client.get("/models/alexnet") assert response.status_code == 200 assert response.json() == {"model_name": "alexnet", "message": "Deep Learning FTW!"} def test_get_enums_lenet(): response = client.get("/models/lenet") assert response.status_code == 200 assert response.json() == {"model_name": "lenet", "message": "LeCNN all the images"} def test_get_enums_resnet():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 5K bytes - Viewed (0) -
docs/de/docs/tutorial/path-params.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.2K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
<a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">Enumerations (or enums) are available in Python</a> since version 3.4. /// /// tip If you are wondering, "AlexNet", "ResNet", and "LeNet" are just names of Machine Learning <abbr title="Technically, Deep Learning model architectures">models</abbr>. /// ### Declare a *path parameter*
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0) -
docs/es/docs/tutorial/path-params.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.4K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-params.md
/// info | "정보" <a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">열거형(또는 enums)</a>은 파이썬 버전 3.4 이후로 사용 가능합니다. /// /// tip | "팁" 혹시 궁금하다면, "AlexNet", "ResNet", 그리고 "LeNet"은 그저 기계 학습 <abbr title="기술적으로 정확히는 딥 러닝 모델 구조">모델</abbr>들의 이름입니다. /// ### *경로 매개변수* 선언 생성한 열거형 클래스(`ModelName`)를 사용하는 타입 어노테이션으로 *경로 매개변수*를 만듭니다: ```Python hl_lines="16"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.8K bytes - Viewed (0) -
docs/tr/docs/tutorial/path-params.md
/// /// tip | "İpucu" Merak ediyorsanız söyleyeyim, "AlexNet", "ResNet" ve "LeNet" isimleri Makine Öğrenmesi <abbr title="Teknik olarak, Derin Öğrenme model mimarileri">modellerini</abbr> temsil eder. /// ### Bir *Yol Parametresi* Tanımlayalım
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/path-params.md
<a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">Перечисления (enum) доступны в Python</a> начиная с версии 3.4. /// /// tip | "Подсказка" Если интересно, то "AlexNet", "ResNet" и "LeNet" - это названия <abbr title="Технически, это архитектуры моделей глубокого обучения">моделей</abbr> машинного обучения. /// ### Определение *параметра пути*
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.1K bytes - Viewed (0) -
docs/fr/docs/tutorial/path-params.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10K bytes - Viewed (0) -
docs/zh/docs/tutorial/path-params.md
``` /// tip | "提示" 使用 `ModelName.lenet.value` 也能获取值 `"lenet"`。 /// #### 返回*枚举元素* 即使嵌套在 JSON 请求体里(例如, `dict`),也可以从*路径操作*返回*枚举元素*。 返回给客户端之前,要把枚举元素转换为对应的值(本例中为字符串): ```Python hl_lines="18 21 23" {!../../docs_src/path_params/tutorial005.py!} ``` 客户端中的 JSON 响应如下: ```JSON { "model_name": "alexnet", "message": "Deep Learning FTW!" } ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0)