nip.utils.torch#
Handy PyTorch classes and utilities, including modules.
Functions
|
Apply orthogonal initialisation to a module's weights and set the biases to 0. |
|
Return a new view of a tensor with the batch dimensions flattened. |
Classes
|
Batch normalization layer with arbitrary batch dimensions. |
|
Concatenate the two node sets for each graph pair. |
|
2D convolutional layer with arbitrary batch dimensions. |
|
A dummy optimizer which does nothing. |
|
A batch sampler which can skip an initial number of items. |
|
A graph isomorphism network (GIN) layer [XHLJ18]. |
|
Global max pooling layer over a dimension. |
|
2D max pool layer with arbitrary batch dimensions. |
|
Normalize the history of one-hot message exchanges. |
|
One-hot encode a tensor. |
|
Transform the input to be invariant to the order of the graphs in a pair. |
|
Add Gaussian noise copied across the graph pair dimension. |
|
Apply a module to each key of a TensorDict. |
|
Print information about an input tensor. |
|
ResNet basic block with arbitrary batch dimensions. |
ResNet bottleneck block with arbitrary batch dimensions. |
|
A mixin for simulating multiple batch dimensions. |
|
|
Squeeze a dimension. |
|
Concatenate the keys of a TensorDict. |
|
Clone the keys of a TensorDict. |
|
Print information about an input tensordict. |
|
Upsample layer with arbitrary batch dimensions. |