Git Product home page Git Product logo

tcav's Introduction

Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)

Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, Rory Sayres

ICML Paper: https://arxiv.org/abs/1711.11279

What is TCAV?

Testing with Concept Activation Vectors (TCAV) is a new interpretability method to understand what signals your neural networks models uses for prediction.

What's special about TCAV compared to other methods?

Typical interpretability methods show importance weights in each input feature (e.g, pixel). TCAV instead shows importance of high level concepts (e.g., color, gender, race) for a prediction class - this is how humans communicate!

Typical interpretability methods require you to have one particular image that you are interested in understanding. TCAV gives an explanation that is generally true for a class of interest, beyond one image (global explanation).

For example, for a given class, we can show how much race or gender was important for classifications in InceptionV3. Even though neither race nor gender labels were part of the training input!

Cool, where do these concepts come from?

TCAV learns concepts from examples. For instance, TCAV needs a couple of examples of female, and something not female to learn a "gender" concept. We have tested a variety of concepts: color, gender, race, textures and many others.

Why use high level concepts instead of input features?

Humans think and communicate using concepts, and not using numbers (e.g., weights to each feature). When there are lots of numbers to combine and reason about (many features), it becomes harder and harder for humans to make sense of the information they are accounting for. TCAV instead delivers explanations in the way humans communicate to each other.

The consumer of the explanation may not know machine learning too well. Can they understand the explanation?

Yes. TCAV is designed to make sense to everyone - as long as they can understand the high level concept!

Sounds good. Do I need to change my network to use TCAV?

No. You don't need to change or retrain your network to use TCAV.

Installation

Tensorflow must be installed to use TCAV. But it isn't included in the TCAV pip package install_requires as a user may wish to use it with either the tensorflow or tensorflow-gpu package. So please pip install tensorflow or tensorflow-gpu as well as the tcav package.

pip install tcav

Requirements

See requirements.txt for a list of python dependencies used in testing TCAV. These will all be installed during pip installation of tcav with the exception of tensorflow, as mentioned above.

How to use TCAV

See Run TCAV.ipynb for step by step guide, after pip installing the tcav package.

mytcav = tcav.TCAV(sess,
                   target,
                   concepts,
                   bottlenecks,
                   act_gen,
                   alphas,
                   cav_dir=cav_dir,
                   num_random_exp=2)

results = mytcav.run()

TCAV for discrete models

We provide a simple example of how to run TCAV on models trained on discrete, non-image data. Please see

cd tcav/tcav_examples/discrete/

You can also find a Jupyter notebook for a model trained on KDD99 in here:

tcav/tcav_examples/discrete/kdd99_discrete_example.ipynb.

Requirements

  • tensorflow
  • numpy
  • Pillow
  • matplotlib
  • scikit-learn
  • scipy

How to run unit tests

python -m tcav.cav_test

python -m tcav.model_test

python -m tcav.tcav_test

python -m tcav.utils_test

How to create a new version of the pip package

  1. Ensure the version in setup.py has been updated to a new version.
  2. Run python setup.py bdist_wheel --python-tag py3 and python setup.py bdist_wheel --python-tag py2.
  3. Run twine upload dist/* to upload the py2 and py3 pip packages to PyPi.

tcav's People

Contributors

a-brain-known-as-ralph avatar ahmadmughees avatar asmadotgh avatar beenkim avatar bharatr21 avatar dependabot[bot] avatar dougkelly avatar gareth001 avatar jameswex avatar jvrsgsty avatar matintavakoli avatar mihaimaruseac avatar monz avatar sherryy avatar shuklak13 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tcav's Issues

Choose random images

hi,

if i test cavs on human face detection, what random images should i use?
e.g. if my concept is women, do i need random images of faces without women, to train the linear classifier properly?
or should i take completely random images?

Support for tf.keras

As tf.keras is the default high level library for TF. Are there any future plans to support tf.keras? This would be really really helpful

hypothesis testing module

I could run tcav on zebra class with concept images. however couldn't find the hypothesis testing (Z-test/T-test) section of code in the repo.
"If we can reject the null hypothesis of a TCAV score of 0.5, we can consider the resulting concept as related to the class prediction in a significant way. " does that mean consider only those concepts that get tcav score > 0.5 and also pass the hypothesis test?

Folder name random500 seems to be hardcoded

I encountered a minor problem while using tcav.
The folder name for the random examples seems to be hard-coded in utils.py, but the public interface to TCAV looks like the user can choose an arbitrary name.

tcav/utils.py

Line 82 in 35e60bd

(target, [concept_set[0], 'random500_{}'.format(i)]))

Tensorflow, scikit and matplotlib versions

Hi, is there any documentation about which Tensorflow, matplotlib and scikit version were used? I sugged creating a requirements.txt file with the output of pip freeze to use the right version while running the files.

Question regarding loss calculation

Hi all,

while adapting the repo code to my own requirements I came across the line for the definition of the loss calculation:

with graph.as_default():
  self.y_input = tf.placeholder(tf.int64, shape=[None])

  self.pred = tf.expand_dims(self.ends['prediction'][0], 0)
  self.loss = tf.reduce_mean(
      tf.nn.softmax_cross_entropy_with_logits(
          labels=tf.one_hot(
              self.y_input,
              self.ends['prediction'].get_shape().as_list()[1]),
          logits=self.pred))
self._make_gradient_tensors()

As far as I understand we are here using the model predictions (class probabilities) as logits for tf.nn.softmax_cross_entropy_with_logits. Based on https://www.tensorflow.org/api_docs/python/tf/nn/softmax_cross_entropy_with_logits I now wonder why we are using class probabilities instead of logits for this argument because the docs say that this op expects unscaled logits since it performs a softmax on the logits internally.

Is there any specific reason for us using this op in this way?

Thanks in advance!

How to reproduce results for Apron, School Bus, Ping pong ball?

Hi,

Thanks a lot for the example code. I am particularly interested in reproducing results for the cases where concepts are coming for protected attributes like- gender, race etc. I tried the 'Apron' example using the gender information from an open source face data set . I am not really sure how the concepts for gender and race should look like and what is the number and size) of images to be taken to reproduce the results. Kindly guide me with the process as I am not getting intuitive results as shown in the paper.

Thanks in advance.

Color reference dataset

Hi all,

I'm working on applying TCAV to my own dataset, and I'd like to start with the same procedure used in the original paper for testing use of the color concept.

I saw in a different issue that you used the Broden dataset for concept images? From looking at their paper it's unclear to me how they generated color images.

Similarly for the diabetic retinopathy experiments, what sort of aneurysm images were used? Were they whole diabetic retinopathy images which included aneurysms (i.e. on the same scale as the input set), or were they zoomed in images of aneurysms (i.e. on a different scale from the input set)? How many samples does the DR dataset have?

I am also curious about whether you have an intuition as to how to choose concept training images. Do you usually construct as abstract as possible of a set, or does it work better to make sure the concept dataset isn't too far from the 'input manifold'? For instance for color I was going to try using gaussian noised color matrices. Thank you!

(Edited to include question about DR)

Which implementation of InceptionV3 should I be using?

Hi,

Which implementation of inceptionv3 should I be using to replicate your results?
The 3 I have used did not have the names of the layers model.py is looking for.
I'd really appreciate if you can point us to the code for inception.

Thanks!

'You must feed a value for placeholder' when using mytcav.run

Hi there,
Im using the TCAV with my project. I modified the model wrapper for my project and it worked when I do act_generator = act_gen.ImageActivationGenerator(mymodel, source_dir, activation_dir, max_examples=200)`

However, it failed when I using results = mytcav.run(run_parallel=False)
The error is You must feed a value for placeholder tensor 't_input' with dtype float and shape [?,?,?,3] which 't_input' is defined at model.py def import_graph.

In addition, there is my wrapper code:

class MyWrapper_public(PublicImageModelWrapper): def __init__(self, sess, model_saved_path, labels_path): self.image_value_range = (0, 1) image_shape_v3 = [224, 224, 3] endpoints = dict( input='x:0', dropout='Placeholder:0', is_train='Placeholder_1:0', logit='fc2/BatchNorm/Reshape_1:0', prediction='Softmax:0' # pre_avgpool='mixed_10/join:0', # logit_weight='softmax/weights:0', # logit_bias='softmax/biases:0', ) self.sess = sess super(MyWrapper_public, self).__init__(sess, model_saved_path, labels_path, image_shape_v3, endpoints, scope='my') self.model_name = 'MyWrapper'

Thanks

Usage

Hello,

Wondering if TCAV can be used with
tabular sparse input data ?
Or do we need to include embedding ?

Issue with get_gradients when using provided examples

Model get_gradients code was changed to accept optional examples, for cases where the raw examples are needed to calculate gradients (such as BERT models). All our current demos don't use the optional examples provided, so there is no effect of the bug described below on our existing demo uses.

But, the examples provided are not the correct examples that align with the activations provided, so if someone were to use the examples in get_gradients, they would get incorrect calculations.

The root case is that the activations are generated with a shuffled set of concept examples, and then a different shuffled set of concept examples are loaded (since get_examples_for_concept shuffles by default) for passing to get_gradients (because the initial set used to calculate the activations isn't saved anywhere currently).

@BeenKim FYI

Questions/Doubts Regarding TCAV

Hi,
I have been testing the TCAV for a bit now and need some clarity on the following doubts.

  1. How many random concepts are really needed to get a trustworthy/statistically significant result? Since running with smaller number of random runs(~50-100) does give statistically significant results but does not give consistent results across multiple runs and running it for 500 random runs is very much computationally expensive, and given that different concepts needs to be tested, makes it really hard.
  2. Why do we need to compute duplicate CAVs between random500_0 and random500_1 and vice-versa? isn't it the same?

I know similar issues have been reported but probably I haven't understood the clear logic here.

TCAV with TensorFlow Object Detection API models

Hi, I run the repo without issues, and I was able to apply it to Keras models (image classification) successfully. Now I'm looking at how to apply it to Object Detection. But I'm pretty lost because the Object Detection API model is an SSDMetaArch file. If you use the *.pb file, don't provide access to backbone layers directly, and these layers are on Keras. Hence I can apply the Keras wrapper neither use one that follows a graph such as the examples provided in this repository.
Any idea or suggestion on where I can start?
Quickly add what I'm able to do:

Get the Keras classification backbone of the Object detector model
Get the bottleneck of this model
Get the input tensor of this model
I cannot pull the loss function from the model, but I can write one.
What not being able to do;

Get the prediction layer
not sure if I need to get the prediction layer by individual bounding boxes
I really appreciate any help you can provide.
P.S. if more details or info is needed from my side. please let me know

Significance testing for Relative TCAV

I am currently trying to implement significance testing for relative CAVs. Lets says that, following the paper, I would like to train the CAV for 'striped', relative to 'dotted' and 'meshed'. As I understand this is trained by taking positive example set P_striped and negative set N := {P_dotted, P_meshed}. In the 'vanilla' CAV setting (concept set vs random set) we can do significance testing by taking N to be a random set, perform multiple runs in which we calculate the CAV from a new random set and perform a t-test on the mean TCAV score of these runs. However in the relative TCAV setting, to my understanding there is no varying random set and we can thus not perform multiple CAV calculations, which means there is no mean mean to use in a t-test.

In 4.2.1 and figure 4 you discuss relative TCAV results for different classes in InceptionV1 and V3 in different layers. Here you omit CAVs when their TCAV score does not significantly differ from 0.5. How can this be calculated? What Am I missing?

google.protobuf.message.DecodeError: Error parsing message

TCAV library -- there's a problem when importing in utils.py. Particularly the line when importing the results_pb2 module. I fixed it by changing "from tcav_results.results_pb2..." to "...tcav.tcav_results_pb2...".

Also there is an incompatibility with tf 2.0. I've tried by replacing tf. with tf.compat.v1. However, I then ran into a decode error, which i opened another issue on.

In addition, i get this error:
File "./tcav/tcav/model.py", line 318, in import_graph
graph_def = tf.compat.v1.GraphDef.FromString(tf.compat.v1.gfile.Open(saved_path, 'rb').read())
google.protobuf.message.DecodeError: Error parsing message

Do you know how I could resolve this problem? Thank you

Python 3 incompatibilities

flake8 testing of https://github.com/tensorflow/tcav on Python 3.6.3

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./tcav.py:96:16: F821 undefined name 'xrange'
      for i in xrange(len(class_acts)):
               ^
./tcav.py:120:14: F821 undefined name 'xrange'
    for i in xrange(len(class_acts)):
             ^
./utils.py:163:62: E901 SyntaxError: invalid syntax
      print '%s: TCAV score: %.2f (+- %.2f), random was %.2f' % (
                                                             ^
1       E901 SyntaxError: invalid syntax
2       F821 undefined name 'xrange'
3

reference to previous issue about choosing bottleneck nodes

Thank you for the detailed answer! Which part of the code are you referencing for the t-test?

This is my first time using the xception model and tcav so I'm not sure but it doesnt look like xception has concat operations. Also, I visualized the graph and it looks like many consecutive depthwise separable convolutions with residual connections in between so there isnt an obvious bottleneck layer like in googlenet or inceptionv3. Is there a specific definition for what the bottleneck layer should be? The only operation I see that collects bottom layer outputs is the "add" operation which are where the residual connection occur. Sorry for asking so many quesitons about this!

_
image


The bottleneck layers typically (not always!) has concat operation (so it is a layer that sort of 'collects' all the bottom layer's responses). You can perhaps look through the loaded graph, and go thru n.node.name (similar to what Sherry mentions above).

Your question might also have to do with 'if I have many bottlenecks, how do I chose one?' I recommend starting from the top layer (a layer closest to the prediction layer) and do the statistical testing (t-test, in the code) and go down one by one until you find one that passes the test.

Feel free to reopen this issue if it hasn't been resolved!

Originally posted by @BeenKim in #57 (comment)

Dot product calculation

Hello,

I am looking at TCAV score calculation, in particular, line 59 of tcav.py file, where the dot product of gradient and CAV is calculated:

dot_prod = np.dot(grad, cav.get_direction(concept))

I might be getting something wrong, but as SGDClassifier() also fits a bias(intercept) by default, should the lm.intercept_ value be added on line 59?
Or just set fit_intercept=False while initializing the classifier:

lm = linear_model.SGDClassifier(alpha=self.hparams['alpha'], max_iter=self.hparams['max_iter'], tol=self.hparams['tol'])

Question about non-image data

Hi all, I came across tcav ands found this method really interesting! Before I dive in to this however, there are a few questions I have and would really appreciate any advice and clarification about this method.

I am linking an issue here that I think is relevant to my use-case but i dont think fully answers my questions:

#35

I too am using tabular data. it is genomic data that consists of many thousands of features which collectively define different organs, ages, genders etc... (binary problem, so for one sample, there will be multiple labels (organ, gender, age etc)...

I have built a simple sequential model which actually performs well in terms of its accuracy to different labels. However, what i would like to understand is which features define certain classes as well as which features might be shared across different samples by accessing hidden layers.

I guess the question here is, is tcav a good use case for this sort of model? is it 'backwards' compatible? and what i mean by this is:

if i define labels such as gender.. if a true pattern is identified by the model, can tcav also tell me which features it found to be a defining factor for being a male or female? in other words, even if it can tell me that stripes define a zebra, can i access also which pixels make up stripes?

or are values such as shap values a better way of doing this sort of analysis?

thank you!

Memory Error

Hi,
I'm sometimes getting this error while waiting for it to finish.
Any idea how to fix it?
I didnt find any solution yet.
The only thing i found is reducing the batch_size, but i dont know how to determine it here.

2020-11-14 12:13:05.528402: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d56d500 of size 294912 next 57062
2020-11-14 12:13:05.528625: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d5b5500 of size 294912 next 57064
2020-11-14 12:13:05.528849: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d5fd500 of size 294912 next 57066
2020-11-14 12:13:05.529074: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d645500 of size 294912 next 57068
2020-11-14 12:13:05.529315: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d68d500 of size 294912 next 57078
2020-11-14 12:13:05.529552: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d6d5500 of size 294912 next 57079
2020-11-14 12:13:05.529776: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d71d500 of size 294912 next 57109
2020-11-14 12:13:05.530002: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d765500 of size 73728 next 57205
2020-11-14 12:13:05.530226: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d777500 of size 73728 next 57206
2020-11-14 12:13:05.530490: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d789500 of size 73728 next 57212
2020-11-14 12:13:05.530712: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d79b500 of size 73728 next 57198
2020-11-14 12:13:05.530934: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d7ad500 of size 147456 next 57197
2020-11-14 12:13:05.531157: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d7d1500 of size 73728 next 57219
2020-11-14 12:13:05.531407: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d7e3500 of size 73728 next 57220
2020-11-14 12:13:05.531627: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d7f5500 of size 73728 next 57227
2020-11-14 12:13:05.531858: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d807500 of size 73728 next 57218
2020-11-14 12:13:05.532082: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d819500 of size 147456 next 57217
2020-11-14 12:13:05.532495: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d83d500 of size 73728 next 57233
2020-11-14 12:13:05.532709: I tensorflow/core/common_runtime/bfc_allocator.cc:990] Free  at 69d84f500 of size 147456 next 57242
2020-11-14 12:13:05.532996: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d873500 of size 147456 next 57238
2020-11-14 12:13:05.533242: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d897500 of size 147456 next 57244
2020-11-14 12:13:05.533480: I tensorflow/core/common_runtime/bfc_allocator.cc:990] Free  at 69d8bb500 of size 147456 next 57236
2020-11-14 12:13:05.533716: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d8df500 of size 147456 next 57240
2020-11-14 12:13:05.533950: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d903500 of size 147456 next 57237
2020-11-14 12:13:05.534185: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d927500 of size 131072 next 57245
2020-11-14 12:13:05.534421: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d947500 of size 147456 next 57248
2020-11-14 12:13:05.534654: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d96b500 of size 131072 next 57251
2020-11-14 12:13:05.534889: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d98b500 of size 147456 next 57254
2020-11-14 12:13:05.535124: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d9af500 of size 147456 next 57257
2020-11-14 12:13:05.535359: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d9d3500 of size 147456 next 57265
2020-11-14 12:13:05.535592: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69d9f7500 of size 147456 next 57272
2020-11-14 12:13:05.535825: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69da1b500 of size 147456 next 57269
2020-11-14 12:13:05.536059: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69da3f500 of size 147456 next 57267
2020-11-14 12:13:05.536333: I tensorflow/core/common_runtime/bfc_allocator.cc:990] InUse at 69da63500 of size 222208 next 18446744073709551615
2020-11-14 12:13:05.536601: I tensorflow/core/common_runtime/bfc_allocator.cc:995]      Summary of in-use Chunks by size: 
2020-11-14 12:13:05.536840: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 29740 Chunks of size 256 totalling 7.26MiB
2020-11-14 12:13:05.537076: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5116 Chunks of size 512 totalling 2.50MiB
2020-11-14 12:13:05.537323: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 605 Chunks of size 768 totalling 453.8KiB
2020-11-14 12:13:05.537554: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2690 Chunks of size 1024 totalling 2.63MiB
2020-11-14 12:13:05.537817: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1081 Chunks of size 1280 totalling 1.32MiB
2020-11-14 12:13:05.538159: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 266 Chunks of size 1536 totalling 399.0KiB
2020-11-14 12:13:05.538393: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 228 Chunks of size 1792 totalling 399.0KiB
2020-11-14 12:13:05.538622: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1730 Chunks of size 2048 totalling 3.38MiB
2020-11-14 12:13:05.538853: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 191 Chunks of size 2304 totalling 429.8KiB
2020-11-14 12:13:05.539084: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 52 Chunks of size 2560 totalling 130.0KiB
2020-11-14 12:13:05.539315: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 36 Chunks of size 2816 totalling 99.0KiB
2020-11-14 12:13:05.539544: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 943 Chunks of size 3072 totalling 2.76MiB
2020-11-14 12:13:05.539772: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 90 Chunks of size 3328 totalling 292.5KiB
2020-11-14 12:13:05.540003: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1042 Chunks of size 3584 totalling 3.56MiB
2020-11-14 12:13:05.540237: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 130 Chunks of size 3840 totalling 487.5KiB
2020-11-14 12:13:05.540488: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1037 Chunks of size 4096 totalling 4.05MiB
2020-11-14 12:13:05.540836: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 33 Chunks of size 4352 totalling 140.2KiB
2020-11-14 12:13:05.541109: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 31 Chunks of size 4608 totalling 139.5KiB
2020-11-14 12:13:05.541380: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 17 Chunks of size 4864 totalling 80.8KiB
2020-11-14 12:13:05.541617: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 47 Chunks of size 5120 totalling 235.0KiB
2020-11-14 12:13:05.541848: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 22 Chunks of size 5376 totalling 115.5KiB
2020-11-14 12:13:05.542078: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 38 Chunks of size 5632 totalling 209.0KiB
2020-11-14 12:13:05.542311: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 991 Chunks of size 5888 totalling 5.56MiB
2020-11-14 12:13:05.542540: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 336 Chunks of size 6144 totalling 1.97MiB
2020-11-14 12:13:05.542770: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 28 Chunks of size 6400 totalling 175.0KiB
2020-11-14 12:13:05.542998: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 80 Chunks of size 6656 totalling 520.0KiB
2020-11-14 12:13:05.543227: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 17 Chunks of size 6912 totalling 114.8KiB
2020-11-14 12:13:05.543459: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 44 Chunks of size 7168 totalling 308.0KiB
2020-11-14 12:13:05.543687: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 15 Chunks of size 7424 totalling 108.8KiB
2020-11-14 12:13:05.543918: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 13 Chunks of size 7680 totalling 97.5KiB
2020-11-14 12:13:05.544144: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 22 Chunks of size 7936 totalling 170.5KiB
2020-11-14 12:13:05.544375: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 49 Chunks of size 8192 totalling 392.0KiB
2020-11-14 12:13:05.544603: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 8448 totalling 57.8KiB
2020-11-14 12:13:05.544828: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 8 Chunks of size 8704 totalling 68.0KiB
2020-11-14 12:13:05.545052: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 8960 totalling 43.8KiB
2020-11-14 12:13:05.545277: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 9216 totalling 18.0KiB
2020-11-14 12:13:05.545501: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 9472 totalling 55.5KiB
2020-11-14 12:13:05.545726: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 9728 totalling 28.5KiB
2020-11-14 12:13:05.545950: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 9984 totalling 19.5KiB
2020-11-14 12:13:05.546174: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 816 Chunks of size 10240 totalling 7.97MiB
2020-11-14 12:13:05.546405: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 10496 totalling 71.8KiB
2020-11-14 12:13:05.546632: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 17 Chunks of size 10752 totalling 178.5KiB
2020-11-14 12:13:05.546864: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 11008 totalling 53.8KiB
2020-11-14 12:13:05.547090: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 11264 totalling 77.0KiB
2020-11-14 12:13:05.547318: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 12 Chunks of size 11520 totalling 135.0KiB
2020-11-14 12:13:05.547550: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 11776 totalling 103.5KiB
2020-11-14 12:13:05.547781: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 12032 totalling 82.2KiB
2020-11-14 12:13:05.548010: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 12288 totalling 108.0KiB
2020-11-14 12:13:05.548280: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 18 Chunks of size 12544 totalling 220.5KiB
2020-11-14 12:13:05.548612: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 12800 totalling 12.5KiB
2020-11-14 12:13:05.548840: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 13056 totalling 12.8KiB
2020-11-14 12:13:05.549062: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 13312 totalling 26.0KiB
2020-11-14 12:13:05.549314: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 10 Chunks of size 13568 totalling 132.5KiB
2020-11-14 12:13:05.549538: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 13824 totalling 54.0KiB
2020-11-14 12:13:05.549759: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 14080 totalling 27.5KiB
2020-11-14 12:13:05.549979: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 48 Chunks of size 14336 totalling 672.0KiB
2020-11-14 12:13:05.550203: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 14592 totalling 71.2KiB
2020-11-14 12:13:05.550453: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 14848 totalling 72.5KiB
2020-11-14 12:13:05.550674: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 15360 totalling 45.0KiB
2020-11-14 12:13:05.550895: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 15616 totalling 106.8KiB
2020-11-14 12:13:05.551119: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 15872 totalling 15.5KiB
2020-11-14 12:13:05.551370: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 16128 totalling 31.5KiB
2020-11-14 12:13:05.551592: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 13 Chunks of size 16384 totalling 208.0KiB
2020-11-14 12:13:05.551819: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 16640 totalling 81.2KiB
2020-11-14 12:13:05.552041: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 16896 totalling 16.5KiB
2020-11-14 12:13:05.552294: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 17152 totalling 33.5KiB
2020-11-14 12:13:05.552519: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 17408 totalling 34.0KiB
2020-11-14 12:13:05.552742: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 35 Chunks of size 17664 totalling 603.8KiB
2020-11-14 12:13:05.552967: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 17920 totalling 35.0KiB
2020-11-14 12:13:05.553187: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 18176 totalling 17.8KiB
2020-11-14 12:13:05.553490: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1024 Chunks of size 18432 totalling 18.00MiB
2020-11-14 12:13:05.553732: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 18688 totalling 164.2KiB
2020-11-14 12:13:05.553962: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 18944 totalling 129.5KiB
2020-11-14 12:13:05.554192: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 19200 totalling 168.8KiB
2020-11-14 12:13:05.554421: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 8 Chunks of size 19456 totalling 152.0KiB
2020-11-14 12:13:05.554649: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 61 Chunks of size 19712 totalling 1.15MiB
2020-11-14 12:13:05.554876: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 19968 totalling 97.5KiB
2020-11-14 12:13:05.555103: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 20224 totalling 19.8KiB
2020-11-14 12:13:05.555330: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 44 Chunks of size 20480 totalling 880.0KiB
2020-11-14 12:13:05.555561: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 8 Chunks of size 20736 totalling 162.0KiB
2020-11-14 12:13:05.555792: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 20992 totalling 20.5KiB
2020-11-14 12:13:05.556018: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 21248 totalling 41.5KiB
2020-11-14 12:13:05.556246: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 21504 totalling 84.0KiB
2020-11-14 12:13:05.556476: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 21760 totalling 21.2KiB
2020-11-14 12:13:05.556703: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 22016 totalling 64.5KiB
2020-11-14 12:13:05.556931: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 22272 totalling 21.8KiB
2020-11-14 12:13:05.557158: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 11 Chunks of size 22528 totalling 242.0KiB
2020-11-14 12:13:05.557390: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 22784 totalling 89.0KiB
2020-11-14 12:13:05.557620: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 23040 totalling 112.5KiB
2020-11-14 12:13:05.557855: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 23808 totalling 69.8KiB
2020-11-14 12:13:05.558082: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 24064 totalling 47.0KiB
2020-11-14 12:13:05.558308: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 24320 totalling 142.5KiB
2020-11-14 12:13:05.558537: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 12 Chunks of size 24576 totalling 288.0KiB
2020-11-14 12:13:05.558768: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 8 Chunks of size 24832 totalling 194.0KiB
2020-11-14 12:13:05.558996: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 25088 totalling 171.5KiB
2020-11-14 12:13:05.559227: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 25344 totalling 24.8KiB
2020-11-14 12:13:05.559455: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 25856 totalling 25.2KiB
2020-11-14 12:13:05.559681: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 26624 totalling 26.0KiB
2020-11-14 12:13:05.559908: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 26880 totalling 52.5KiB
2020-11-14 12:13:05.560136: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 27392 totalling 26.8KiB
2020-11-14 12:13:05.560365: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 29 Chunks of size 27904 totalling 790.2KiB
2020-11-14 12:13:05.560596: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 25 Chunks of size 28672 totalling 700.0KiB
2020-11-14 12:13:05.560826: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 28928 totalling 56.5KiB
2020-11-14 12:13:05.561051: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 29696 totalling 58.0KiB
2020-11-14 12:13:05.561281: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 26 Chunks of size 29952 totalling 760.5KiB
2020-11-14 12:13:05.561512: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 30208 totalling 29.5KiB
2020-11-14 12:13:05.561738: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 23 Chunks of size 30720 totalling 690.0KiB
2020-11-14 12:13:05.561969: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 30976 totalling 60.5KiB
2020-11-14 12:13:05.562199: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 31232 totalling 61.0KiB
2020-11-14 12:13:05.562425: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 31488 totalling 30.8KiB
2020-11-14 12:13:05.562651: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 31744 totalling 124.0KiB
2020-11-14 12:13:05.562881: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 32256 totalling 189.0KiB
2020-11-14 12:13:05.563112: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 32512 totalling 63.5KiB
2020-11-14 12:13:05.563340: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 32768 totalling 128.0KiB
2020-11-14 12:13:05.563569: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 33024 totalling 64.5KiB
2020-11-14 12:13:05.563795: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 33280 totalling 32.5KiB
2020-11-14 12:13:05.564020: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 33536 totalling 32.8KiB
2020-11-14 12:13:05.564391: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 33792 totalling 66.0KiB
2020-11-14 12:13:05.564621: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 34048 totalling 33.2KiB
2020-11-14 12:13:05.564842: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 34560 totalling 67.5KiB
2020-11-14 12:13:05.565066: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 34816 totalling 204.0KiB
2020-11-14 12:13:05.565318: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 35072 totalling 34.2KiB
2020-11-14 12:13:05.565538: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 36352 totalling 35.5KiB
2020-11-14 12:13:05.565760: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 483 Chunks of size 48384 totalling 22.29MiB
2020-11-14 12:13:05.565987: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 48640 totalling 142.5KiB
2020-11-14 12:13:05.566239: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 48896 totalling 47.8KiB
2020-11-14 12:13:05.566461: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1019 Chunks of size 49152 totalling 47.77MiB
2020-11-14 12:13:05.566690: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 49408 totalling 434.2KiB
2020-11-14 12:13:05.566913: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 49664 totalling 97.0KiB
2020-11-14 12:13:05.567138: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 52 Chunks of size 49920 totalling 2.48MiB
2020-11-14 12:13:05.567405: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 50176 totalling 98.0KiB
2020-11-14 12:13:05.567628: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 50432 totalling 147.8KiB
2020-11-14 12:13:05.567850: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 23 Chunks of size 50688 totalling 1.11MiB
2020-11-14 12:13:05.568073: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 50944 totalling 49.8KiB
2020-11-14 12:13:05.568338: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 51200 totalling 250.0KiB
2020-11-14 12:13:05.568561: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 51456 totalling 351.8KiB
2020-11-14 12:13:05.568783: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 51968 totalling 101.5KiB
2020-11-14 12:13:05.569005: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 52224 totalling 204.0KiB
2020-11-14 12:13:05.569256: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 52480 totalling 102.5KiB
2020-11-14 12:13:05.569479: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 52736 totalling 257.5KiB
2020-11-14 12:13:05.569703: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 21 Chunks of size 52992 totalling 1.06MiB
2020-11-14 12:13:05.569927: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 53248 totalling 156.0KiB
2020-11-14 12:13:05.570150: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 53504 totalling 52.2KiB
2020-11-14 12:13:05.570403: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 53760 totalling 315.0KiB
2020-11-14 12:13:05.570627: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 54016 totalling 158.2KiB
2020-11-14 12:13:05.570853: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 54272 totalling 53.0KiB
2020-11-14 12:13:05.571074: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 54528 totalling 266.2KiB
2020-11-14 12:13:05.571327: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 54784 totalling 53.5KiB
2020-11-14 12:13:05.571550: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 26 Chunks of size 55296 totalling 1.37MiB
2020-11-14 12:13:05.571771: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 56064 totalling 109.5KiB
2020-11-14 12:13:05.571995: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 56832 totalling 166.5KiB
2020-11-14 12:13:05.572246: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 57344 totalling 56.0KiB
2020-11-14 12:13:05.572466: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 57600 totalling 112.5KiB
2020-11-14 12:13:05.572690: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 57856 totalling 56.5KiB
2020-11-14 12:13:05.572911: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 58368 totalling 57.0KiB
2020-11-14 12:13:05.573131: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 58624 totalling 286.2KiB
2020-11-14 12:13:05.573385: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 58880 totalling 57.5KiB
2020-11-14 12:13:05.573606: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 59392 totalling 522.0KiB
2020-11-14 12:13:05.573940: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 59648 totalling 116.5KiB
2020-11-14 12:13:05.574200: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 59904 totalling 58.5KiB
2020-11-14 12:13:05.574421: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 60160 totalling 117.5KiB
2020-11-14 12:13:05.574645: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 60928 totalling 59.5KiB
2020-11-14 12:13:05.574866: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 61184 totalling 179.2KiB
2020-11-14 12:13:05.575088: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 61440 totalling 120.0KiB
2020-11-14 12:13:05.575340: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 61952 totalling 121.0KiB
2020-11-14 12:13:05.575563: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 62208 totalling 243.0KiB
2020-11-14 12:13:05.575786: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 62464 totalling 366.0KiB
2020-11-14 12:13:05.576008: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 62720 totalling 183.8KiB
2020-11-14 12:13:05.576286: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 62976 totalling 123.0KiB
2020-11-14 12:13:05.576510: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 14 Chunks of size 63488 totalling 868.0KiB
2020-11-14 12:13:05.576734: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 63744 totalling 124.5KiB
2020-11-14 12:13:05.576956: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 64256 totalling 313.8KiB
2020-11-14 12:13:05.577207: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 64512 totalling 126.0KiB
2020-11-14 12:13:05.577431: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 64768 totalling 63.2KiB
2020-11-14 12:13:05.577651: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 65280 totalling 63.8KiB
2020-11-14 12:13:05.577872: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 65536 totalling 256.0KiB
2020-11-14 12:13:05.578095: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 66048 totalling 322.5KiB
2020-11-14 12:13:05.578346: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 66560 totalling 65.0KiB
2020-11-14 12:13:05.578566: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 67072 totalling 65.5KiB
2020-11-14 12:13:05.578787: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 67584 totalling 330.0KiB
2020-11-14 12:13:05.579010: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 68096 totalling 332.5KiB
2020-11-14 12:13:05.579262: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 68352 totalling 333.8KiB
2020-11-14 12:13:05.579486: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 68608 totalling 201.0KiB
2020-11-14 12:13:05.579710: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 68864 totalling 67.2KiB
2020-11-14 12:13:05.579931: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 69376 totalling 67.8KiB
2020-11-14 12:13:05.580168: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 69632 totalling 204.0KiB
2020-11-14 12:13:05.580518: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 71168 totalling 69.5KiB
2020-11-14 12:13:05.580801: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 71424 totalling 69.8KiB
2020-11-14 12:13:05.581081: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 71680 totalling 70.0KiB
2020-11-14 12:13:05.581346: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 72192 totalling 70.5KiB
2020-11-14 12:13:05.581566: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 72448 totalling 70.8KiB
2020-11-14 12:13:05.581785: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 72704 totalling 142.0KiB
2020-11-14 12:13:05.582005: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1098 Chunks of size 73728 totalling 77.20MiB
2020-11-14 12:13:05.582278: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 73984 totalling 144.5KiB
2020-11-14 12:13:05.582498: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 74496 totalling 436.5KiB
2020-11-14 12:13:05.582718: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 74752 totalling 73.0KiB
2020-11-14 12:13:05.582934: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 75264 totalling 367.5KiB
2020-11-14 12:13:05.583170: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 75776 totalling 74.0KiB
2020-11-14 12:13:05.583402: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 76032 totalling 148.5KiB
2020-11-14 12:13:05.583621: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 76288 totalling 298.0KiB
2020-11-14 12:13:05.583841: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 77056 totalling 75.2KiB
2020-11-14 12:13:05.584060: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 77312 totalling 75.5KiB
2020-11-14 12:13:05.584306: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 77824 totalling 76.0KiB
2020-11-14 12:13:05.584526: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 78336 totalling 688.5KiB
2020-11-14 12:13:05.584746: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 78592 totalling 537.2KiB
2020-11-14 12:13:05.584967: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 79104 totalling 154.5KiB
2020-11-14 12:13:05.585217: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 10 Chunks of size 79872 totalling 780.0KiB
2020-11-14 12:13:05.585441: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 80640 totalling 78.8KiB
2020-11-14 12:13:05.585659: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 81408 totalling 397.5KiB
2020-11-14 12:13:05.585881: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 114 Chunks of size 81920 totalling 8.91MiB
2020-11-14 12:13:05.586105: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 33 Chunks of size 82688 totalling 2.60MiB
2020-11-14 12:13:05.586353: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 82944 totalling 81.0KiB
2020-11-14 12:13:05.586571: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 83712 totalling 81.8KiB
2020-11-14 12:13:05.586789: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 83968 totalling 410.0KiB
2020-11-14 12:13:05.587009: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 84224 totalling 82.2KiB
2020-11-14 12:13:05.587257: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 84480 totalling 165.0KiB
2020-11-14 12:13:05.587478: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 84992 totalling 166.0KiB
2020-11-14 12:13:05.587698: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 86528 totalling 338.0KiB
2020-11-14 12:13:05.587920: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 87296 totalling 85.2KiB
2020-11-14 12:13:05.588153: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 87552 totalling 513.0KiB
2020-11-14 12:13:05.588475: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 88064 totalling 344.0KiB
2020-11-14 12:13:05.588711: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 88576 totalling 86.5KiB
2020-11-14 12:13:05.588934: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 89088 totalling 87.0KiB
2020-11-14 12:13:05.589237: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 89600 totalling 87.5KiB
2020-11-14 12:13:05.589461: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 89856 totalling 175.5KiB
2020-11-14 12:13:05.589683: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 90112 totalling 792.0KiB
2020-11-14 12:13:05.589905: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 90368 totalling 88.2KiB
2020-11-14 12:13:05.590141: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 90624 totalling 265.5KiB
2020-11-14 12:13:05.590378: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 91136 totalling 178.0KiB
2020-11-14 12:13:05.590718: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 91392 totalling 89.2KiB
2020-11-14 12:13:05.590953: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 92160 totalling 270.0KiB
2020-11-14 12:13:05.591187: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 93184 totalling 91.0KiB
2020-11-14 12:13:05.591418: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 93696 totalling 366.0KiB
2020-11-14 12:13:05.591648: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 94208 totalling 92.0KiB
2020-11-14 12:13:05.591880: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 94720 totalling 92.5KiB
2020-11-14 12:13:05.592111: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 95232 totalling 93.0KiB
2020-11-14 12:13:05.592342: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 96000 totalling 93.8KiB
2020-11-14 12:13:05.592573: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 96256 totalling 188.0KiB
2020-11-14 12:13:05.592805: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 96768 totalling 189.0KiB
2020-11-14 12:13:05.593039: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 97536 totalling 476.2KiB
2020-11-14 12:13:05.593292: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 42 Chunks of size 98304 totalling 3.94MiB
2020-11-14 12:13:05.593525: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 99072 totalling 193.5KiB
2020-11-14 12:13:05.593803: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 99840 totalling 97.5KiB
2020-11-14 12:13:05.594037: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 102656 totalling 100.2KiB
2020-11-14 12:13:05.594270: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 104448 totalling 102.0KiB
2020-11-14 12:13:05.594501: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 108800 totalling 106.2KiB
2020-11-14 12:13:05.594731: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 109824 totalling 107.2KiB
2020-11-14 12:13:05.594961: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 114688 totalling 224.0KiB
2020-11-14 12:13:05.595195: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 115456 totalling 112.8KiB
2020-11-14 12:13:05.595424: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 120832 totalling 118.0KiB
2020-11-14 12:13:05.595660: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 15 Chunks of size 122880 totalling 1.76MiB
2020-11-14 12:13:05.595890: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 125184 totalling 122.2KiB
2020-11-14 12:13:05.596477: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 128256 totalling 125.2KiB
2020-11-14 12:13:05.596773: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 129024 totalling 126.0KiB
2020-11-14 12:13:05.597788: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 130560 totalling 127.5KiB
2020-11-14 12:13:05.598229: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 789 Chunks of size 131072 totalling 98.62MiB
2020-11-14 12:13:05.598484: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 132608 totalling 129.5KiB
2020-11-14 12:13:05.598721: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 139008 totalling 135.8KiB
2020-11-14 12:13:05.598955: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 139264 totalling 408.0KiB
2020-11-14 12:13:05.599190: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 146688 totalling 143.2KiB
2020-11-14 12:13:05.599423: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1477 Chunks of size 147456 totalling 207.70MiB
2020-11-14 12:13:05.599662: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 151552 totalling 148.0KiB
2020-11-14 12:13:05.599894: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 152832 totalling 149.2KiB
2020-11-14 12:13:05.600129: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 155648 totalling 152.0KiB
2020-11-14 12:13:05.600360: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 156160 totalling 152.5KiB
2020-11-14 12:13:05.600596: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 157696 totalling 154.0KiB
2020-11-14 12:13:05.600831: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 49 Chunks of size 163840 totalling 7.66MiB
2020-11-14 12:13:05.601088: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 164352 totalling 160.5KiB
2020-11-14 12:13:05.601330: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 165888 totalling 162.0KiB
2020-11-14 12:13:05.601560: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 167168 totalling 163.2KiB
2020-11-14 12:13:05.601786: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 172032 totalling 504.0KiB
2020-11-14 12:13:05.602013: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 13 Chunks of size 180224 totalling 2.23MiB
2020-11-14 12:13:05.602237: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 182272 totalling 178.0KiB
2020-11-14 12:13:05.602461: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 183296 totalling 179.0KiB
2020-11-14 12:13:05.602687: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 186624 totalling 182.2KiB
2020-11-14 12:13:05.602912: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 188416 totalling 1.26MiB
2020-11-14 12:13:05.603134: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 188672 totalling 184.2KiB
2020-11-14 12:13:05.603360: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 191488 totalling 187.0KiB
2020-11-14 12:13:05.603585: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 196608 totalling 960.0KiB
2020-11-14 12:13:05.603810: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 197376 totalling 192.8KiB
2020-11-14 12:13:05.604036: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 198912 totalling 194.2KiB
2020-11-14 12:13:05.604263: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 199936 totalling 195.2KiB
2020-11-14 12:13:05.604489: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 204800 totalling 400.0KiB
2020-11-14 12:13:05.604717: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 11 Chunks of size 212992 totalling 2.23MiB
2020-11-14 12:13:05.604944: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 218368 totalling 213.2KiB
2020-11-14 12:13:05.605171: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 218624 totalling 213.5KiB
2020-11-14 12:13:05.605399: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 38 Chunks of size 221184 totalling 8.02MiB
2020-11-14 12:13:05.605625: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 221440 totalling 216.2KiB
2020-11-14 12:13:05.605850: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 222208 totalling 434.0KiB
2020-11-14 12:13:05.606077: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 227328 totalling 222.0KiB
2020-11-14 12:13:05.606304: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 229376 totalling 1.31MiB
2020-11-14 12:13:05.606530: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 230144 totalling 224.8KiB
2020-11-14 12:13:05.606755: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 231168 totalling 225.8KiB
2020-11-14 12:13:05.606981: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 231424 totalling 226.0KiB
2020-11-14 12:13:05.607508: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 237568 totalling 696.0KiB
2020-11-14 12:13:05.607745: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 242432 totalling 236.8KiB
2020-11-14 12:13:05.607997: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 245760 totalling 1.17MiB
2020-11-14 12:13:05.608237: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 246528 totalling 240.8KiB
2020-11-14 12:13:05.608464: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 253952 totalling 248.0KiB
2020-11-14 12:13:05.608691: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 17 Chunks of size 262144 totalling 4.25MiB
2020-11-14 12:13:05.608915: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 265472 totalling 259.2KiB
2020-11-14 12:13:05.609171: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 278528 totalling 1.86MiB
2020-11-14 12:13:05.609397: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1031 Chunks of size 294912 totalling 289.97MiB
2020-11-14 12:13:05.609628: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 295680 totalling 288.8KiB
2020-11-14 12:13:05.609853: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 295936 totalling 289.0KiB
2020-11-14 12:13:05.610094: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 299520 totalling 292.5KiB
2020-11-14 12:13:05.610335: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 301056 totalling 294.0KiB
2020-11-14 12:13:05.610559: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 305920 totalling 298.8KiB
2020-11-14 12:13:05.610783: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 311296 totalling 608.0KiB
2020-11-14 12:13:05.611006: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 315136 totalling 307.8KiB
2020-11-14 12:13:05.611257: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 319488 totalling 624.0KiB
2020-11-14 12:13:05.611481: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 319744 totalling 312.2KiB
2020-11-14 12:13:05.611705: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 327680 totalling 1.25MiB
2020-11-14 12:13:05.611927: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 329728 totalling 322.0KiB
2020-11-14 12:13:05.612183: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 333824 totalling 326.0KiB
2020-11-14 12:13:05.612455: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 337920 totalling 330.0KiB
2020-11-14 12:13:05.612765: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 344064 totalling 1.64MiB
2020-11-14 12:13:05.613050: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 344832 totalling 336.8KiB
2020-11-14 12:13:05.613323: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 360448 totalling 2.06MiB
2020-11-14 12:13:05.613622: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 365056 totalling 356.5KiB
2020-11-14 12:13:05.613906: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 368640 totalling 3.16MiB
2020-11-14 12:13:05.614164: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 376832 totalling 736.0KiB
2020-11-14 12:13:05.614401: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 11 Chunks of size 393216 totalling 4.12MiB
2020-11-14 12:13:05.614625: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 409600 totalling 400.0KiB
2020-11-14 12:13:05.614848: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 417792 totalling 816.0KiB
2020-11-14 12:13:05.615101: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 425984 totalling 416.0KiB
2020-11-14 12:13:05.615352: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 20 Chunks of size 442368 totalling 8.44MiB
2020-11-14 12:13:05.615578: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 443136 totalling 432.8KiB
2020-11-14 12:13:05.615803: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 447744 totalling 437.2KiB
2020-11-14 12:13:05.616028: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 448512 totalling 438.0KiB
2020-11-14 12:13:05.616283: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 7 Chunks of size 458752 totalling 3.06MiB
2020-11-14 12:13:05.616506: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 466944 totalling 456.0KiB
2020-11-14 12:13:05.616732: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 475136 totalling 464.0KiB
2020-11-14 12:13:05.616957: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 478976 totalling 467.8KiB
2020-11-14 12:13:05.617209: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 9 Chunks of size 491520 totalling 4.22MiB
2020-11-14 12:13:05.617430: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 507904 totalling 1.45MiB
2020-11-14 12:13:05.617652: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 524288 totalling 2.00MiB
2020-11-14 12:13:05.617874: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 526592 totalling 514.2KiB
2020-11-14 12:13:05.618125: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 532480 totalling 520.0KiB
2020-11-14 12:13:05.618348: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 540672 totalling 2.58MiB
2020-11-14 12:13:05.618571: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 563712 totalling 550.5KiB
2020-11-14 12:13:05.618794: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 589824 totalling 1.69MiB
2020-11-14 12:13:05.619017: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 11 Chunks of size 1048576 totalling 11.00MiB
2020-11-14 12:13:05.619275: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1130496 totalling 1.08MiB
2020-11-14 12:13:05.619499: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 997 Chunks of size 1179648 totalling 1.09GiB
2020-11-14 12:13:05.619729: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1189888 totalling 1.13MiB
2020-11-14 12:13:05.619954: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1196032 totalling 1.14MiB
2020-11-14 12:13:05.620209: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1212416 totalling 2.31MiB
2020-11-14 12:13:05.620435: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1245184 totalling 1.19MiB
2020-11-14 12:13:05.620660: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1255936 totalling 1.20MiB
2020-11-14 12:13:05.620884: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1310720 totalling 1.25MiB
2020-11-14 12:13:05.621137: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1327104 totalling 1.27MiB
2020-11-14 12:13:05.621360: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 1343488 totalling 3.84MiB
2020-11-14 12:13:05.621583: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1376256 totalling 1.31MiB
2020-11-14 12:13:05.621806: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1392640 totalling 2.66MiB
2020-11-14 12:13:05.622029: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1409024 totalling 1.34MiB
2020-11-14 12:13:05.622294: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1441792 totalling 1.38MiB
2020-11-14 12:13:05.622518: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 11 Chunks of size 1474560 totalling 15.47MiB
2020-11-14 12:13:05.622746: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1507328 totalling 1.44MiB
2020-11-14 12:13:05.622971: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1523712 totalling 2.91MiB
2020-11-14 12:13:05.623224: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1540096 totalling 2.94MiB
2020-11-14 12:13:05.623449: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1622016 totalling 3.09MiB
2020-11-14 12:13:05.623673: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 1638400 totalling 9.38MiB
2020-11-14 12:13:05.623926: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1654784 totalling 1.58MiB
2020-11-14 12:13:05.624188: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1671168 totalling 1.59MiB
2020-11-14 12:13:05.624507: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1687552 totalling 1.61MiB
2020-11-14 12:13:05.624734: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1703936 totalling 1.62MiB
2020-11-14 12:13:05.624959: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 13 Chunks of size 1769472 totalling 21.94MiB
2020-11-14 12:13:05.625216: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 3 Chunks of size 1785856 totalling 5.11MiB
2020-11-14 12:13:05.625440: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1802240 totalling 1.72MiB
2020-11-14 12:13:05.625665: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1835008 totalling 1.75MiB
2020-11-14 12:13:05.625904: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 4 Chunks of size 1916928 totalling 7.31MiB
2020-11-14 12:13:05.626173: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 1933312 totalling 9.22MiB
2020-11-14 12:13:05.626397: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1949696 totalling 1.86MiB
2020-11-14 12:13:05.626623: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 1966080 totalling 3.75MiB
2020-11-14 12:13:05.626847: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 1979136 totalling 1.89MiB
2020-11-14 12:13:05.627228: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 37 Chunks of size 2064384 totalling 72.84MiB
2020-11-14 12:13:05.627511: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 2080768 totalling 1.98MiB
2020-11-14 12:13:05.627794: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 2097152 totalling 10.00MiB
2020-11-14 12:13:05.628020: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 2211840 totalling 10.55MiB
2020-11-14 12:13:05.628258: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 8 Chunks of size 2228224 totalling 17.00MiB
2020-11-14 12:13:05.628483: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 2244608 totalling 2.14MiB
2020-11-14 12:13:05.628706: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 2277376 totalling 2.17MiB
2020-11-14 12:13:05.628930: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 6 Chunks of size 2359296 totalling 13.50MiB
2020-11-14 12:13:05.629156: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 5 Chunks of size 4194304 totalling 20.00MiB
2020-11-14 12:13:05.629381: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 8388608 totalling 8.00MiB
2020-11-14 12:13:05.629605: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 2 Chunks of size 9437184 totalling 18.00MiB
2020-11-14 12:13:05.629831: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 10458368 totalling 9.97MiB
2020-11-14 12:13:05.630057: I tensorflow/core/common_runtime/bfc_allocator.cc:998] 1 Chunks of size 70705152 totalling 67.43MiB
2020-11-14 12:13:05.630286: I tensorflow/core/common_runtime/bfc_allocator.cc:1002] Sum Total of in-use chunks: 2.40GiB
2020-11-14 12:13:05.630500: I tensorflow/core/common_runtime/bfc_allocator.cc:1004] total_region_allocated_bytes_: 2576980224 memory_limit_: 2576980377 available bytes: 153 curr_region_allocation_bytes_: 4294967296
2020-11-14 12:13:05.630882: I tensorflow/core/common_runtime/bfc_allocator.cc:1010] Stats: 
Limit:                  2576980377
InUse:                  2576546048
MaxInUse:               2576806912
NumAllocs:                  739099
MaxAllocSize:           1603297280

2020-11-14 12:13:05.633868: W tensorflow/core/common_runtime/bfc_allocator.cc:439] ****************************************************************************************************
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1365, in _do_call
    return fn(*args)
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _run_fn
    target_list, run_metadata)
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1443, in _call_tf_sessionrun
    run_metadata)
tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.
  (0) Internal: Dst tensor is not initialized.
	 [[{{node _arg_vggface_resnet50/vggface_resnet50/add_15/add_0_1}}]]
  (1) Internal: Dst tensor is not initialized.
	 [[{{node _arg_vggface_resnet50/vggface_resnet50/add_15/add_0_1}}]]
	 [[gradients_16/vggface_resnet50/vggface_resnet50/activation_48/Relu_grad/ReluGrad/_9]]
0 successful operations.
0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\liepe\ConceptActivationVectorsTest\Test.py", line 66, in <module>
    target,
  File "C:\Program Files\Python37\lib\site-packages\tcav-0.2.1-py3.7.egg\tcav\tcav.py", line 224, in run
    results.append(self._run_single_set(param, overwrite=overwrite, run_parallel=run_parallel))
  File "C:\Program Files\Python37\lib\site-packages\tcav-0.2.1-py3.7.egg\tcav\tcav.py", line 283, in _run_single_set
    run_parallel=run_parallel)
  File "C:\Program Files\Python37\lib\site-packages\tcav-0.2.1-py3.7.egg\tcav\tcav.py", line 104, in compute_tcav_score
    mymodel, act, cav, concept, class_id, example):
  File "C:\Program Files\Python37\lib\site-packages\tcav-0.2.1-py3.7.egg\tcav\tcav.py", line 58, in get_direction_dir_sign
    act, [class_id], cav.bottleneck, example), -1)
  File "C:\Program Files\Python37\lib\site-packages\tcav-0.2.1-py3.7.egg\tcav\model.py", line 157, in get_gradient
    self.y_input: y
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 958, in run
    run_metadata_ptr)
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1181, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1359, in _do_run
    run_metadata)
  File "C:\Program Files\Python37\lib\site-packages\tensorflow\python\client\session.py", line 1384, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: 2 root error(s) found.
  (0) Internal: Dst tensor is not initialized.
	 [[{{node _arg_vggface_resnet50/vggface_resnet50/add_15/add_0_1}}]]
  (1) Internal: Dst tensor is not initialized.
	 [[{{node _arg_vggface_resnet50/vggface_resnet50/add_15/add_0_1}}]]
	 [[gradients_16/vggface_resnet50/vggface_resnet50/activation_48/Relu_grad/ReluGrad/_9]]
0 successful operations.
0 derived errors ignored.

Understanding of CAVs

Hi,

I have been trying to generate some results for a gender bias problem using Inception. I created a Male Concept and a Female concept (each having roughly 50 images) and have been trying to follow the steps mentioned in the Notebook. but I think I am misinterpreting something here.
So I created a Random concept (with 100 random images of cars, truck, etc) and defined my concepts to be [Male,Female] while the random_concepts variable is assigned to the above mentioned folder of random images. Now I can see the CAVs for the Male and Female concept getting generated but the code breaks up inside utils_plot.py as my random_i_ups dictionary is empty. As after debugging, it seems the function is_random_concept always returns false but a random concept is needed for generating the plots.
So should I have a CAV for the random concept too so that the random_i_ups is not empty? If yes then how can it be generated as I only have one random_concept with me which has like 100 images in it of random objects.
Probably I am misunderstanding something here. Some clarity would be really appreciated.

Difficulties with saved model format

Hi all,

Currently I'm running into some difficulties using the TCAV framework for models based on the saved model format. When I use models stored and loaded using the h5 or frozen graph format all experiments work fine. When I then try to conduct experiments based on models stored and loaded with the saved model format there arise some issues.

First problem is that the loaded graph seems to be missing some operations of specific types such as "MaxPool" or "Reshape" which you could use as bottleneck layer with h5 or frozen graph models. After adapting the code to the loaded graph by changing the layer types/names I get an exception "tensorflow.python.framework.errors_impl.FailedPreconditionError [...]". Based on that I tried to implement some workarounds which unfortunately didn't solve the problem so far.

Did anyone had similar problems and managed to use models based on the saved model format for the TCAV framework?

Thanks!

Sorting images with CAVs

Hi all. Thanks for sharing the code. I've been trying to reproduce the results of the paper, and I have a question about Section 4.1.1. Sorting images with CAVs saying that

we can compute cosine similarity between a set of pictures of interest to the CAV to sort the pictures.

Does it mean that for each picture in the set, we compute the cosine similarity between CAV and the activation of the picture and then sort the pictures by the measured similarity?

I'd appreciate it if you give me some clarification. Thanks!

Different TCAV scores

Hi, I have a simple Keras .h5 model and I am trying to get TCAV scores for some concepts, however, I noticed that if I run TCAV multiple times (resetting the runtime before each run) on the same model, target class and the same images, I am getting different TCAV and Statistical Significance scores every time.

Is it a normal behaviour? Thank you

Not able to run all the bottlenecks together for any given model

image
The above image shows an error of "can't start a new thread" when I am trying to run all the bottlenecks together for inception5h. i.e,

bottlenecks = [ 'mixed3a','mixed3b','mixed4a','mixed4b','mixed4c','mixed4d','mixed4e','mixed5a','mixed5b']

At max, I can run only two bottlenecks at a time. For three and above no. of bottlenecks, I am facing this issue.
Please let me know if there is any way to proceed further to avoid this error. Looking forward to suggestions.

Kernel crashing with an unknow reason

I am trying to use tcav with my CNN keras model, but my kernel keeps crashing for an unknown reason when launching tcav.run().
After checking the code seems that the error is presenting when calling compute_tcav_score in this line of tcav.py

i_up = self.compute_tcav_score(
mymodel, target_class_for_compute_tcav_score, cav_concept,
cav_instance, acts[target_class][cav_instance.bottleneck],
activation_generator.get_examples_for_concept(target_class),
run_parallel=run_parallel)

The wrapper I have created for my keras model is the following:

class KerasModelWrapper(model.ImageModelWrapper):
""" ModelWrapper for keras models

    By default, assumes that your model contains one input node, one output head
and one loss function.
Computes gradients of the output layer in respect to a CAV.

Args:
    sess: Tensorflow session we will use for TCAV.
    model_path: Path to your model.h5 file, containing a saved trained
      model.
    labels_path: Path to a file containing the labels for your problem. It
      requires a .txt file, where every line contains a label for your
      model. You want to make sure that the order of labels in this file
      matches with the logits layers for your model, such that file[i] ==
      model_logits[i]
"""

def __init__(
    self,
    sess,
    model_path,
    labels_path,
    image_shape
):
    self.sess = sess
    self.model_name = 'cifar_CNN'
    super(KerasModelWrapper, self).__init__(image_shape)
    self.import_keras_model(model_path)
    self.labels = tf.io.gfile.GFile(labels_path).read().splitlines()

    # Construct gradient ops. Defaults to using the model's output layer
    self.y_input = tf.compat.v1.placeholder(tf.int64, shape=[None])
    self.loss = self.model.loss_functions[0](self.y_input,
                                             self.model.outputs[0])
    self._make_gradient_tensors()

def id_to_label(self, idx):
    return self.labels[idx]

def label_to_id(self, label):
    return self.labels.index(label)

def import_keras_model(self, saved_path):
    """Loads keras model, fetching bottlenecks, inputs and outputs."""
    self.ends = {}
    self.model = tf.keras.models.load_model(saved_path)
    self.get_bottleneck_tensors()
    self.get_inputs_and_outputs_and_ends()

def get_bottleneck_tensors(self):
    self.bottlenecks_tensors = {}
    layers = self.model.layers
    for layer in layers:
        if 'input' not in layer.name:
            self.bottlenecks_tensors[layer.name] = layer.output

def get_inputs_and_outputs_and_ends(self):
    self.ends['input'] = self.model.inputs[0]
    self.ends['prediction'] = self.model.outputs[0]

I don't know if can help but from the log I can retrieve only this information before the crash
F ./tensorflow/core/util/bcast.h:111] Check failed: vec.size() == NDIMS (1 vs. 2)

What am I doing wrong?

question regarding model wrappers (xception model)

Hi I have a imagenet-pretrained xception network trained on histology images. I would like to be able to use tcav with this model; however, I'm unsure of how to determine the bottleneck layers that tcav asks for. 1) am i able to use this model for tcav and 2) do you have any suggestions on how to get the bottleneck tensors? I can get all the tensors for the network with graph.get_operations but I'm not sure if any or which of those are relevant.

Thank you for your help!

Object Concepts

Hello, I am trying to use an object concept to sort images. I cannot find mention of the format of input for object CAVs in the repo or paper. The Broden daatset provides specific masks for objects of interest appearing in the dataset. In the paper, when using an object concept, did you mask out the regions of images corresponding to the object of interest, zero out the background, and use the resulting images for the concept dataset? Or crop the image based on the mask to only include the object? Or assemble a completely new dataset, separate from Broden, consisting of images of the object concept? Or something else completely?

Inceptionv3 pb file?

I know that the googlenet pb file is uploaded, but could you also release the inceptionv3 pb file that was used? I would like to compare the results with the inception v3 model I have from keras. There are some differences with parsing from the pb files and since I was unable to use the import graph function (FromString) provided in PublicImageModelWrapper, I modified it to be able to parse the protobuf file (ParseFromString) I got from the pretrained keras model. I don't know why the FromString function in the class method does not work for my model but it would be good to compare...The names of the tensors are also slightly different so I'm not sure if the correct tensors were used for the endpoints dictionary.

Specifications of 500 random experiments

Hi,
Can you please share the specifications of TCAV hyposthesis testing ?. Some information like number of workers used, type of GPU and run time will be really helpful.

Question regarding directional derivative computation

Hi,
While working with tcav code after reading the related paper " Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)" (https://arxiv.org/pdf/1711.11279.pdf), I had trouble understanding the computation of the directional derivative.

From my understanding of the paper, 'Conceptual sensitivity' is measured by the directional derivative of logit values with respect to activations at the layer of interest. Thus for scoring you take into account the proportions of image with positive directional derivative.

On the other hand in the code, as shown in the snippet below, sensitivity score seems to be the directional derivative of loss values with respect to activations at the layer of interest.

tcav/tcav/model.py

Lines 54 to 55 in c7f5510

self.bottlenecks_gradients[bn] = tf.gradients(
self.loss, self.bottlenecks_tensors[bn])[0]

As the loss is a function of the logits, the gradient we obtain in the code depends of the loss function we choose. In your case with cross entropy (snippet below) using the article's notation we have :
CodeCogsEqn-1

This leads to a change in magnitude ( which is not used is the score) but also in terms of sign.

tcav/tcav/model.py

Lines 173 to 178 in c7f5510

self.loss = tf.reduce_mean(
tf.nn.softmax_cross_entropy_with_logits(
labels=tf.one_hot(
self.y_input,
self.ends['prediction'].get_shape().as_list()[1]),
logits=self.pred))

Though it seems that in the code you compensate the sign change by counting the number of negative gradients instead (last snippet).

tcav/tcav/tcav.py

Lines 42 to 60 in c7f5510

def get_direction_dir_sign(mymodel, act, cav, concept, class_id, example):
"""Get the sign of directional derivative.
Args:
mymodel: a model class instance
act: activations of one bottleneck to get gradient with respect to.
cav: an instance of cav
concept: one concept
class_id: index of the class of interest (target) in logit layer.
example: example corresponding to the given activation
Returns:
sign of the directional derivative
"""
# Grad points in the direction which DECREASES probability of class
grad = np.reshape(mymodel.get_gradient(
act, [class_id], cav.bottleneck, example), -1)
dot_prod = np.dot(grad, cav.get_direction(concept))
return dot_prod < 0

Have I misunderstood either the paper or the code ? Or is there a specific reason to use loss instead of logit, as you still obtain the same score by changing sign ?
Thank you for your answer !

Few conceptual questions around TCAV

Hi,

Thanks a lot for sharing the valuable codes. I have few basic questions:

As per the research paper, concept vector is orthogonal to the decision boundary. Can you please guide us where in the code is that happening?
In the implementation (https://github.com/tensorflow/tcav/blob/master/tcav/tcav.py) line 86, tcav score is defined as "TCAV score (i.e., ratio of pictures that returns negative dot product wrt loss)." Can you please tell us why we are taking a negative dot product as the positive influence- It will really help solve my confusion. Looking forward to getting response soon.

protobuf file

Hi,

I can execute the code on downloading googlenet.pb file which contains both the variables names and their respective weights.

I've my own model and have searched extensively how to write protobuf file which contains both the variables names and their respective weights but nothing works at this moment.

Can you please let me know how you have written the protobuf file?

Unable to run the tests, program and notebook

Hey there,

I was trying to use the code from the repository and i found that things were not working for me. Here are the things that are of concern to me :

  • Run TCAV.ipynb returns me an error saying No module named tcav_results despite installing tcav.
  • pip install -r requirements.txt throws an error because you used a single = sign instead of ==.
  • python -m tcav.cav_test throws me an error saying ModuleNotFoundError: No module named 'tcav_results'

Useful information :

  • python --version

Python 3.6.5

  • pip --version

pip 19.3.1

  • uname -a

Linux x1 4.15.0-70-generic #79~16.04.1-Ubuntu SMP Tue Nov 12 14:01:10 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Using resnet

Hi,
I was having problem with using TCAV with resnet. Could you provide me with an example?

[Request] Example data

Would it be possible to provide links to an example of required model files and concept/target data? It would be much easier for people to test out with a self-contained example.

How to use TCAV with custom keras models(h5)

Is it possible to use TCAV with custom keras models(h5).If so,Can you please provide the reference notebook or mention where the changes need to be made w.r.t Run TCAV notebook present in the repository.Thank you.

Can we extend the concept vectors to sequential data(LSTM, GRU)

We have some medical domain vocabulary which contains a list of 500 unique events, we are using the GRU model to predict what might happen in the future, and while doing so we are looking for some explanation about what event is changing the model activations more, so how can we extend TCAV to GRU or LSTM models
Thanks

No module found with name 'cav'

How do I install this module? I've tried multiple common commands that I am aware of.

ModuleNotFoundError: No module named 'cav'

Following commands I tried:
pip install cav
conda install cav

imagenet_and_broden_fetcher.py only able to fetch texture concepts

I'm modifying the download_and_make_datasets.py file to look at other concepts for Zebra TCAV, and when I try to change the concepts to color, or object, or other things, the broden fetcher tells me that no images were available. I noticed the imagenet_and_broden_fetcher.py only has a download_texture_to_working_folder function, and doesn't look like it supports fetching other concepts. I was wondering if this was the case and I would need to implement that myself, or if there is an established way in the open source code to fetch non-texture-based concepts like 'black-c' (a color concept)? Any help would be appreciated, thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.