Hi,
I am trying to train the resnet34 model on a classification task and I am getting this error:
ValueError: Error when checking target: expected predictions to have shape (176,) but got array with shape (2,)
My config file is:
model_config {
arch: “resnet”
n_layers: 34
use_bias: True
use_batch_norm: True
all_projections: True
use_pooling: False
freeze_bn: False
freeze_blocks: 0
freeze_blocks: 1input_image_size: “3,224,224”
}eval_config {
eval_dataset_path: “/workspace/nvidia_experiment/dataset-man-woman/test”
model_path: “/workspace/nvidia_experiment/tlt_pretrained_classification_vresnet34/resnet_34.hdf5”
top_k: 3
#conf_threshold: 0.5
batch_size: 2
n_workers: 8}
train_config {
train_dataset_path: “/workspace/nvidia_experiment/dataset-man-woman/train”
val_dataset_path: “/workspace/nvidia_experiment/dataset-man-woman/val”
pretrained_model_path: “/workspace/nvidia_experiment/tlt_pretrained_classification_vresnet34/resnet_34.hdf5”optimizer: “sgd”
batch_size_per_gpu: 2
n_epochs: 80
n_workers: 16reg_config {
type: “L2”
scope: “Conv2D,Dense”
weight_decay: 0.00005}
lr_config {
scheduler: "soft_anneal" learning_rate: 0.005 soft_start: 0.056 annealing_points: "0.3, 0.6, 0.8" annealing_divider: 10
}
}
Please advice!