This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import json | |
import os | |
import sys | |
import uuid | |
import traceback | |
from concurrent import futures |