Skip to content

Instantly share code, notes, and snippets.

View ShomyLiu's full-sized avatar

HT Liu ShomyLiu

View GitHub Profile
ShomyLiu /
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 /
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