fork download
  1. y_train_new = []
  2. for i in y_train:
  3. y_train_new.append(labels.index(i))
  4. y_train=y_train_new
  5. y_train = tf.keras.utils.to_categorical(y_train)
  6.  
  7. y_test_new = []
  8. for i in y_test:
  9. y_test_new.append(labels.index(i))
  10. y_test=y_test_new
  11. y_test = tf.keras.utils.to_categorical(y_test)
Success #stdin #stdout 0.02s 25784KB
stdin
Standard input is empty
stdout
y_train_new = []
for i in y_train:
    y_train_new.append(labels.index(i))
y_train=y_train_new
y_train = tf.keras.utils.to_categorical(y_train)

y_test_new = []
for i in y_test:
    y_test_new.append(labels.index(i))
y_test=y_test_new
y_test = tf.keras.utils.to_categorical(y_test)