hanruihua / rl_rvo_nav

The source code of the [RA-L] paper "Reinforcement Learned Distributed Multi-Robot Navigation with Reciprocal Velocity Obstacle Shaped Rewards"
MIT License
174 stars 31 forks source link

关于RNN网络的问题 #24

Closed ZSHCRWY25 closed 2 months ago

ZSHCRWY25 commented 2 months ago

您好!代码中的state_dim=6应该对应的是论文中的Oself,而rnn_input_dim=8应该对应的是Osur,即观测到的所有RVO向量,但是在RNN网络中,您又定义了一个维度为64的隐藏层rnn_hidden_dim,并且将其与state_dim相加得到归一化层维度70的,用于归一化展开的移动向量(没理解错应该就是所有的Osur)。有如下几个问题:1、rnn_hidden_dim隐藏层起什么作用?2、为何要将rnn_hidden_dim与state_dim相加作为归一化层的维度?3、如果按照最大的RVO数量(10个)归一化层维度应该为8*10=80,为何此处的归一化层为70?刚接触神经网络,理解不到位求大佬指点

hanruihua commented 2 months ago

你好,

1) rnn_hidden_dim的隐藏层代表了多个rvo 向量聚合后的特征向量; 2) 因此,rnn_hidden_dim层与satate_dim层相加就是完整的障碍物信息与机器人本体信息; 3)多个数量的RVO向量会通过bi-GRU 聚合成为一个固定的长度的向量来表征障碍物信息,因此rnn_hidden_dim 层才是代表的所有障碍物,rnn_input_dim 层描述的是单个障碍物的特征。

主要的点在于对于RNN的理解,这里RNN的作用就是用来处理数量变化的周围障碍物,并且将长短不一序列的障碍物特征向量聚合输出固定维度的特征向量。

Translation: 1) The hidden layer of rnn_hidden_dim represents the feature vector that is aggregated from multiple RVO vectors. 2) Therefore, the sum of rnn_hidden_dim layer and state_dim layer represents the complete obstacle information and self-robot information. 3) Multiple RVO vectors will be aggregated into a fixed-length vector by bi-GRU to represent obstacle information. Therefore, rnn_hidden_dim layer represents all obstacles, while rnn_input_dim layer describes the features of a single obstacle.

The main point is to understand the role of RNN, which is used to process the changing number of surrounding obstacles and aggregate the feature vectors of obstacles with different lengths into a fixed dimension.