Error - Redefinition of variable Uniform1

I keep getting this error. Not using any custom models or anything - here’s a screencap of my model.

Not trying to load previous weights either, unlike the other poster with this error.

YAML file here -


dataset: {name: chest-xray-sorted, samples: 5856, type: private}
datasetLoadOption: full
kfold: 1
options: {}
port: OutputPort0
shape: ‘’
type: Categorical
options: {Augmentation: false, Height: ‘150’, Normalization: false, Resize: true,
Scaling: 1, Width: ‘150’, height_shift_range: 0, horizontal_flip: false, pretrained: None,
rotation_range: 0, shear_range: 0, vertical_flip: false, width_shift_range: 0}
port: InputPort0
shape: ‘’
type: Image
numPorts: 1
samples: {split: 4, test: 585, training: 4684, validation: 585}
shuffle: true

  • {source: GlobalAveragePooling2D_1, target: Dense_1}
  • {source: Dropout_21, target: GlobalAveragePooling2D_1}
  • {source: InceptionV3_25, target: Dropout_21}
  • {source: Input_1, target: InceptionV3_25}
  • {source: BatchNormalization_1, target: Dense_2}
  • {source: Dense_1, target: BatchNormalization_1}
  • {source: Dense_2, target: Output_12}
  • args: {}
    class: Input
    name: Input_1
    x: 36
    y: 41
  • args: {include_top: false, trainable: ‘100’}
    class: InceptionV3
    name: InceptionV3_25
    x: 24
    y: 151
  • args: {p: ‘.5’}
    class: Dropout
    name: Dropout_21
    x: 21
    y: 258
  • args: {}
    class: GlobalAveragePooling2D
    name: GlobalAveragePooling2D_1
    x: 27
    y: 372
  • args: {activation: relu, output_dim: ‘128’}
    class: Dense
    name: Dense_1
    x: 338
    y: 54
  • args: {}
    class: BatchNormalization
    name: BatchNormalization_1
    x: 328
    y: 158
  • args: {activation: sigmoid, output_dim: ‘3’}
    class: Dense
    name: Dense_2
    x: 309
    y: 258
  • args: {}
    class: Output
    name: Output_12
    x: 304
    y: 379
    batch_size: 32
    loss_func: categorical_crossentropy
    num_epoch: 10
    optimizer: {name: Adadelta}
    project: XRay Project 01

You are getting this error because for using inception v3 model your input should have 3 channel.


Hi Rajat: I got the same error information “Redefinition of variable Uniform1”, my train model as below screencap, could you give me any tips to solve this problem?

Hi Ning Zhang
I think you have the same error as above.
Your input image has 4 channels instead of 3 as required by VGG19

Hi Rajat, thank you , I understand it.