Skip to content

Error when running eval_cifar10.py #16

@NainaSaid

Description

@NainaSaid

Hello. I have trained the network but when running the eval_cifar10.py file, i get the following error. Why this might be happening?

Traceback (most recent call last):
File "/data22/nas/NN_calibration/scripts/resnet_cifar/eval_model_c10.py", line 130, in
evaluate_model(model, weights_file_10, x_test, y_test, bins = 15, verbose = True,
File "/data22/nas/NN_calibration/scripts/utility/evaluation.py", line 33, in evaluate_model
o = last_layer(model.layers[-1].output)
File "/data22/nas/myvm/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/data22/nas/myvm/lib/python3.10/site-packages/tensorflow/python/framework/ops.py", line 1973, in _create_c_op
raise ValueError(e.message)
ValueError: Exception encountered when calling layer "dense" (type Dense).

Dimensions must be equal, but are 10 and 64 for '{{node dense/MatMul}} = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false](Placeholder, dense/MatMul/ReadVariableOp)' with input shapes: [?,10], [64,10].

Call arguments received by layer "dense" (type Dense):
• inputs=tf.Tensor(shape=(None, 10), dtype=float32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions