浏览代码

Better placeholder for encoded_self than None

/develop/singular-embeddings
vincentpierre 4 年前
当前提交
92005ea6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ml-agents/mlagents/trainers/torch/networks.py

4
ml-agents/mlagents/trainers/torch/networks.py


embeddings.append(var_len_processor(encoded_self, var_len_input))
qkv = torch.cat(embeddings, dim=1)
attention_embedding = self.rsa(qkv, masks)
if encoded_self is None:
if encoded_self.shape[1] == 0:
if encoded_self is None:
if encoded_self.shape[1] == 0:
raise Exception("No valid inputs to network.")
# Constants don't work in Barracuda

正在加载...
取消
保存