PyTorch
knowledge skill
The agent writes and executes Python code using the PyTorch library to build, train, and evaluate neural network architectures. It produces a trained model state dictionary or a tensor-based prediction output.
Worked examples
- {"input": {"model_architecture": "Linear(784, 128) -> ReLU -> Linear(128, 10)", "dataset_specs": {"input_shape": [784], "output_shape": [10]}, "hyperparameters": {"lr": 0.001, "epochs": 5}}, "output": {"state_dict": {"layer1.weight": "tensor([[0.12, -0.05, ...]])", "layer1.bias": "tensor([0.01, ...])"}, "metrics": {"loss": 0.24, "accuracy": 0.91}}}
- {"input": {"model_architecture": "Conv2d(3, 16, 3) -> MaxPool2d(2) -> Flatten -> Linear(16*14*14, 2)", "dataset_specs": {"input_shape": [3, 28, 28], "output_shape": [2]}, "hyperparameters": {"lr": 0.01, "epochs": 10}}, "output": {"state_dict": {"conv1.weight": "tensor([[[[0.01, ...]]]])"}, "metrics": {"loss": 0.11, "accuracy": 0.96}}}
Input
- model_architecture: string: definition of layers and activation functions
- dataset_specs: object: tensor shapes and normalization parameters
- hyperparameters: object: learning rate, batch size, and epoch count
Output
- state_dict: object: mapped weights and biases of the trained network
- metrics: object: final loss and accuracy values
- tensor_output: array: raw model predictions
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0