pbaylies / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
740 stars 182 forks source link

learning directions #9

Closed ak9250 closed 5 years ago

ak9250 commented 5 years ago

how would you get something like 'emotion' 'happiness' for the linear model? y_emotion_data = np.array([x['faceAttributes']['emotion']['happiness'] for x in labels_data])?

ak9250 commented 5 years ago

solved it using this

from sklearn.linear_model import SGDRegressor sgds = SGDRegressor() sld = sgds.fit(x_test, ytest) results = sld.coef.reshape((18, 512))

pbaylies commented 5 years ago

@ak9250 the notebooks in the repo left over from @Puzer do a decent job of outlining how to do this, as well; glad you figured it out!