Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMOE - Replicate the Original paper Chapter 3.2 (Synthetic Data) #68

Closed
Steven-1124 opened this issue Dec 21, 2023 · 1 comment
Closed

Comments

@Steven-1124
Copy link

Hi there!

I try hard to replicate the original paper for MMOE Arch while have no idea to get the package run.

Same as the original paper, my data is Synthetic Data like x is a random vector, y1, and y2 are two task vectors generated based on x. I want to reshow Figure 4 in the authors's paper, thus having to calculate loss as well.

Below is how I generate the data:

`
def generate_orthogonal_vectors(d):
u1 = np.random.rand(d)
u1 = u1 / np.linalg.norm(u1)
u2 = np.random.rand(d)
u2 = u2 - np.dot(u2, u1) * u1
u2 = u2 / np.linalg.norm(u2)
return u1, u2

def generate_weight_vectors(u1, u2, c, p):
w1 = c * u1
w2 = c * p * u1 + np.sqrt(1 - p**2) * u2
return w1, w2

def generate_labels(data, w, alpha, beta, m, epsilon):
y = np.dot(data, w)
for i in range(m):
y += np.sin(alpha[i] * np.dot(data, w) + beta[i])
y += epsilon * np.random.randn(len(data))
return y
`

The example you posted is more complex data compared to mine and I do not have GPU device. Also, I did not find your main.py

Could you show me how to run the package in Jupiter?

Thanks so much!

@Baijiong-Lin
Copy link
Collaborator

We will add it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants