Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for AlexNet (0.34 sec)

  1. tests/test_tutorial/test_path_params/test_tutorial005.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_params.tutorial005 import app
    
    client = TestClient(app)
    
    
    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
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 5K bytes
    - Viewed (0)
  2. docs_src/path_params/tutorial005.py

    from enum import Enum
    
    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":
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Aug 26 13:26:03 GMT 2022
    - 546 bytes
    - Viewed (0)
  3. docs/es/docs/tutorial/path-params.md

        Las <a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">Enumerations (o enums) están disponibles en Python</a> desde la versión 3.4.
    
    !!! tip "Consejo"
        Si lo estás dudando, "AlexNet", "ResNet", y "LeNet" son solo nombres de <abbr title="Técnicamente, arquitecturas de modelos de Deep Learning">modelos</abbr> de Machine Learning.
    
    ### Declara un *parámetro de path*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.4K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/path-params.md

    ```
    
    !!! info
        <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*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/path-params.md

    ```
    
    !!! info "说明"
    
        Python 3.4 及之后版本支持<a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">枚举(即 enums)</a>。
    
    !!! tip "提示"
    
        **AlexNet**、**ResNet**、**LeNet** 是机器学习<abbr title="技术上来说是深度学习模型架构">模型</abbr>。
    
    ### 声明*路径参数*
    
    使用 Enum 类(`ModelName`)创建使用类型注解的*路径参数*:
    
    ```Python hl_lines="16"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/path-params.md

        <a href="https://docs.python.org/3/library/enum.html" class="external-link" target="_blank">Enumerations (ou enums) estão disponíveis no Python</a> desde a versão 3.4.
    
    !!! tip "Dica"
    	Se você está se perguntando, "AlexNet", "ResNet", e "LeNet" são apenas nomes de <abbr title="técnicamente, modelos de arquitetura de Deep Learning">modelos</abbr> de Machine Learning (aprendizado de máquina).
    
    ### Declare um *parâmetro de rota*
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 9.7K bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/path-params.md

    👫 🔜 🗜 👫 🔗 💲 (🎻 👉 💼) ⏭ 🛬 👫 👩‍💻:
    
    ```Python hl_lines="18  21  23"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    👆 👩‍💻 👆 🔜 🤚 🎻 📨 💖:
    
    ```JSON
    {
      "model_name": "alexnet",
      "message": "Deep Learning FTW!"
    }
    ```
    
    ## ➡ 🔢 ⚗ ➡
    
    ➡️ 💬 👆 ✔️ *➡ 🛠️* ⏮️ ➡ `/files/{file_path}`.
    
    ✋️ 👆 💪 `file_path` ⚫️ 🔌 *➡*, 💖 `home/johndoe/myfile.txt`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top