求解Raven递进矩阵的泛关系网络
wild-relation-network的Python项目详细描述
野生关系网
求解Raven递进矩阵的关系网络[1]和Wild关系网络[2]的PyTorch实现。在
设置
$ pip install wild_relation_network
使用
关系网络:
^{pr2}$野生关系网:
importtorchfromwild_relation_networkimportWReNx=torch.rand(4,16,160,160)wren=WReN(num_channels=32,use_object_triples=False,use_layer_norm=False)logits=wren(x)y_hat=logits.log_softmax(dim=-1)y_hat# torch.Tensor with shape (4, 8)
单元测试
$ python -m pytest tests
书目
[1]Santoro,Adam,et al.“关系推理的简单神经网络模块”,神经信息处理系统进展。2017在
[2]Santoro,Adam,et al.“神经网络中抽象推理的测量”,国际机器学习会议。2018在
引用
@inproceedings{santoro2017simple,title={A simple neural network module for relational reasoning},author={Santoro, Adam and Raposo, David and Barrett, David G and Malinowski, Mateusz and Pascanu, Razvan and Battaglia, Peter and Lillicrap, Timothy},booktitle={Advances in neural information processing systems},pages={4967--4976},year={2017}}
@inproceedings{santoro2018measuring,title={Measuring abstract reasoning in neural networks},author={Santoro, Adam and Hill, Felix and Barrett, David and Morcos, Ari and Lillicrap, Timothy},booktitle={International Conference on Machine Learning},pages={4477--4486},year={2018}}
- 项目
标签: