Skip to content

Instantly share code, notes, and snippets.

View ShomyLiu's full-sized avatar
🎯
Focusing

HT Liu ShomyLiu

🎯
Focusing
View GitHub Profile
@ShomyLiu
ShomyLiu / pytorch-fm.py
Created December 31, 2018 08:27
因子分解机Factorization Machine pytorch 实现
import torch
class FM_Layer(nn.Module):
def __init__(self, n=10, k=5):
```
n: 输入维度
k: factor的维度
```
super(FM_Layer, self).__init__()
self.n = n
self.k = k
@ShomyLiu
ShomyLiu / extract_item_from_aminer.py
Last active December 2, 2018 07:15
extract author/org/paper from aminer json data toimport neo4j
#!/usr/bin/env python
# encoding: utf-8
import json
import os
import sys
import uuid
import traceback
from concurrent import futures