Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow Error when Training Bigan Model #1

Open
pdefusco opened this issue Mar 30, 2021 · 2 comments
Open

Tensorflow Error when Training Bigan Model #1

pdefusco opened this issue Mar 30, 2021 · 2 comments

Comments

@pdefusco
Copy link

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: []

@andrewrreed andrewrreed self-assigned this Apr 14, 2021
@daniraviQSA
Copy link

Yes, I had the same issue. Has someone managed to solve this?

@andrewrreed andrewrreed removed their assignment Sep 23, 2021
@Landino98
Copy link

I have the same problem, train of bigan is faulty. Why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants