pytorch-fm icon indicating copy to clipboard operation
pytorch-fm copied to clipboard

Factorization Machine models in PyTorch

Results 19 pytorch-fm issues
Sort by recently updated
recently updated
newest added

Hi, In layer.py, class `FeaturesEmbedding`, one finds the line ```python self.offsets = np.array(0, *np.cumsum(field_dims)[:-1]), dtype=np.long) ``` My code generates an error. I replaced `np.array` by `torch.tensor` and `np.cumsum` by `torch.cumsum`...

I execute `python main.py` under the `examples/` folder, and get the error: ``` % python main.py --dataset_path criteo/train.txt Traceback (most recent call last): File "main.py", line 189, in main(args.dataset_name, File...

In FM and HOFM papers, there is a hyper parameter k which helps to control the size of latent factor. Just wondering where is the k in the code? Is...

In FeaturesLinear def __init__(self, field_dims, output_dim=1): super().__init__() self.fc = torch.nn.Embedding(sum(field_dims), output_dim) self.bias = torch.nn.Parameter(torch.zeros((output_dim,))) self.offsets = np.array((0, *np.cumsum(field_dims)[:-1]), dtype=np.long) def forward(self, x): """ :param x: Long tensor of size ``(batch_size,...

Dear DaLao: what's the function of "self.offsets" ? self.offsets = np.array((0, *np.cumsum(field_dims)[:-1]), dtype=np.long) def forward(self, x): x = x + x.new_tensor(self.offsets).unsqueeze(0)

I noticed that for the deemFM model, [the implemented mlp_dim is (16, 16)](https://github.com/rixwew/pytorch-fm/blob/f74ad19771eda104e99874d19dc892e988ec53fa/examples/main.py#L74). However in the original deepFM paper, the network structure specified is 400-400-400 (screenshot below). May I ask...

When I run the main.py, I get the following error: Traceback (most recent call last): File "main.py", line 16, in from torchfm.model.hofm import HighOrderFactorizationMachineModel ModuleNotFoundError: No module named 'torchfm.model.hofm'

`Traceback (most recent call last): File "C:\Users\Faaiz-PC\Downloads\Avazu\main.py", line 189, in main(args.dataset_name, File "C:\Users\Faaiz-PC\Downloads\Avazu\main.py", line 151, in main dataset = get_dataset(dataset_name, dataset_path) File "C:\Users\Faaiz-PC\Downloads\Avazu\main.py", line 35, in get_dataset return AvazuDataset(path) File...

in rendle's paper, the optimized parameter is b w and v, why use emdedding vector here?