Skip to content

Tensorflow Error when Training Bigan Model #1

@pdefusco

Description

@pdefusco

Hello,
I am using this AMP in CML and the deployment of all assets was successful. I am running the train_all() method in train.py and when it gets to the bigan model I get the following error:

ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 18), dtype=tf.float32, name='inputdata'), name='inputdata', description="created by layer 'inputdata'") at layer "dropout_2". The following previous layers were accessed without issue: []
ValueError Traceback (most recent call last)
in engine
----> 1 train_all()

in train_all()
4 train_vae()
5 train_svm()
----> 6 train_bigan()
7 train_seq2seq()

in train_bigan()
10 bigan.train(in_train, in_test)
11 bigan.save_model()
---> 12 inlier_scores = bigan.compute_anomaly_score(in_test)
13 outlier_scores = bigan.compute_anomaly_score(out_test)
14 print(inlier_scores)

/home/cdsw/models/bigan.py in compute_anomaly_score(self, input_data, weight_parameter, lnorm_degree)
227 # This model is used to compute feature loss
228 feat_model = Model(inputs=self.discriminator.get_input_at(
--> 229 0), outputs=self.discriminator.get_layer("discriminator_features").output)
230
231 # Compute z values from the input data using our encoder

/home/cdsw/.local/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
515 self._self_setattr_tracking = False # pylint: disable=protected-access
516 try:
--> 517 result = method(self, *args, **kwargs)
518 finally:
519 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/home/cdsw/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/functional.py in init(self, inputs, outputs, name, trainable, **kwargs)
118 generic_utils.validate_kwargs(kwargs, {})
119 super(Functional, self).init(name=name, trainable=trainable)
--> 120 self._init_graph_network(inputs, outputs)
121
122 @trackable.no_automatic_dependency_tracking

/home/cdsw/.local/lib/python3.6/site-packages/tensorflow/python/training/tracking/base.py in _method_wrapper(self, *args, **kwargs)
515 self._self_setattr_tracking = False # pylint: disable=protected-access
516 try:
--> 517 result = method(self, *args, **kwargs)
518 finally:
519 self._self_setattr_tracking = previous_value # pylint: disable=protected-access

/home/cdsw/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/functional.py in _init_graph_network(self, inputs, outputs)
202 # Keep track of the network's nodes and layers.
203 nodes, nodes_by_depth, layers, _ = _map_graph_network(
--> 204 self.inputs, self.outputs)
205 self._network_nodes = nodes
206 self._nodes_by_depth = nodes_by_depth

/home/cdsw/.local/lib/python3.6/site-packages/tensorflow/python/keras/engine/functional.py in _map_graph_network(inputs, outputs)
988 'The following previous layers '
989 'were accessed without issue: ' +
--> 990 str(layers_with_complete_input))
991 for x in nest.flatten(node.outputs):
992 computable_tensors.add(id(x))

ValueError: Graph disconnected: cannot obtain value for tensor KerasTensor(type_spec=TensorSpec(shape=(None, 18), dtype=tf.float32, name='inputdata'), name='inputdata', description="created by layer 'inputdata'") at layer "dropout_2". The following previous layers were accessed without issue: []

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions