pytorch

2018-11-19  本文已影响0人  我想我是她的海

class torch.nn.Embedding

store word embeddings and retrieve them using indices.

| Parameters: |

| Variables: |

weight (Tensor) – the learnable weights of the module of shape (num_embeddings, embedding_dim)

torch.tensor

| Parameters: |

class torch.nn.MarginRankingLoss

transE中标准用法

torch.abs

Computes the element-wise absolute value of the given input tensor.
返回的是一个tensor。

view(*args)

Returns a new tensor with the same data as the self tensor but of a different size.

torch.mean()

Returns the mean value of all elements in the input tensor.

torch.mean(input, 1)

对每一行求平均

上一篇 下一篇

猜你喜欢

热点阅读