'Accuracy output with Tensorflow
I have been using tensorflow for a while now, acc used to be a value between 0 and 100. I am running a different model now, and the acc is reading between 0 and 1 with loss between 0 and 1 as well as MAE.
generator = PaddedGraphGenerator(graphs=sgg)
k = 35 # the number of rows for the output tensor
layer_sizes = [32, 32, 32, 1]
dgcnn_model = DeepGraphCNN(
layer_sizes=layer_sizes,
activations=["tanh", "tanh", "tanh", "tanh"],
k=k,
bias=False,
generator=generator,
)
x_inp, x_out = dgcnn_model.in_out_tensors()
x_out = Conv1D(filters=16, kernel_size=sum(layer_sizes), strides=sum(layer_sizes))(x_out)
x_out = MaxPool1D(pool_size=2)(x_out)
x_out = Conv1D(filters=32, kernel_size=5, strides=1)(x_out)
x_out = Flatten()(x_out)
x_out = Dense(units=128, activation="relu")(x_out)
x_out = Dropout(rate=0.5)(x_out)
predictions = Dense(units=5, activation="sigmoid")(x_out)
model = Model(inputs=x_inp, outputs=predictions)
model.compile(
optimizer=Adam(lr=0.0001), loss=tf.keras.losses.binary_crossentropy, metrics=['acc', 'mae'],
)
labels are in the form of categories in a dataframe:
|Good| Bad| Mid| Bad| Worst|
0 1 0 0 0
1 0 0 0 0
0 0 0 0 1
etc. Any suggestions?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
