Initial robot vacuum code

This commit is contained in:
2026-04-26 12:38:39 +08:00
commit ca6234c941
38 changed files with 1673 additions and 0 deletions

34
agent_diy/model/model.py Normal file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
###########################################################################
# Copyright © 1998 - 2026 Tencent. All Rights Reserved.
###########################################################################
"""
Author: Tencent AI Arena Authors
Robot Vacuum DIY model implementation.
清扫大作战 DIY 模型实现。
"""
import torch
import numpy as np
from torch import nn
import torch.nn.functional as F
class Model(nn.Module):
"""DIY model class.
DIY 模型类。
"""
def __init__(self, state_shape, action_shape=0, softmax=False):
"""Initialize the model.
初始化模型。
"""
super().__init__()
# User-defined network
# 用户自定义网络