donut
donut copied to clipboard
Want to execute for cpu4.csv of Donut dataset
Hi Haowen Xu, I am trying to run the Donut sample dataset cpu4.csv I have done these following things for invoking cpu4.csv
df = pd.read_csv("sample_data/cpu4.csv") timestamp, values, labels = df.timestamp, df.value, df.label import tensorflow as tf from donut import Donut from tensorflow import keras as K from tfsnippet.modules import Sequential
We build the entire model within the scope of model_vs
,
it should hold exactly all the variables of model
, including
the variables created by Keras layers.
with tf.variable_scope('model') as model_vs: model = Donut( h_for_p_x=Sequential([ K.layers.Dense(100, kernel_regularizer=K.regularizers.l2(0.001), activation=tf.nn.relu), K.layers.Dense(100, kernel_regularizer=K.regularizers.l2(0.001), activation=tf.nn.relu), ]), h_for_q_z=Sequential([ K.layers.Dense(100, kernel_regularizer=K.regularizers.l2(0.001), activation=tf.nn.relu), K.layers.Dense(100, kernel_regularizer=K.regularizers.l2(0.001), activation=tf.nn.relu), ]), x_dims=120, z_dims=5, )
''' Training of Donut model ''' from donut import DonutTrainer, DonutPredictor
trainer = DonutTrainer(model=model, model_vs=model_vs) predictor = DonutPredictor(model)
with tf.Session().as_default(): trainer.fit(train_values, train_labels, train_missing, mean, std) test_score = predictor.get_score(test_values, test_missing)
I am not able to understand how to set input_x and input_y I am getting this error message: FailedPreconditionError: Error while reading resource variable model/sequential_1/forward/_1/dense_3/bias from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/model/sequential_1/forward/_1/dense_3/bias)
add param about
df = pd.read_csv("sample_data/cpu4.csv") just like df = pd.read_csv(r"path", header='infer'....)
hi, dguhanus:
Have you solved this problem? I meet the same FailedPreconditionError right now. Thank you sincerely.
hi: Sorry,I haven't solved this problem all the time. And then I started doing something else. I'm sorry I can't help you.
发自我的iPhone
------------------ Original ------------------ From: backhamburger <[email protected]> Date: Wed,Dec 2,2020 10:22 PM To: NetManAIOps/donut <[email protected]> Cc: qpan7777 <[email protected]>, Comment <[email protected]> Subject: Re: [NetManAIOps/donut] Want to execute for cpu4.csv of Donut dataset (#18)
hi, dguhanus:
Have you solved this problem? I meet the same FailedPreconditionError right now. Thank you sincerely.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi I could not solve the problem.
On Wed, Dec 2, 2020 at 7:52 PM backhamburger [email protected] wrote:
hi, dguhanus:
Have you solved this problem? I meet the same FailedPreconditionError right now. Thank you sincerely.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NetManAIOps/donut/issues/18#issuecomment-737260236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMTWCGQOKJNTGFIUYIUN5EDSSZESXANCNFSM4JC7O4BQ .
-- A nation that forgets it's history or it's geography does so at it's Peril-The story of integration of The India States - P 413