You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: