You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use OCTET, you will need to instantiate a `Config` object with the desired parameters. The `Config` object should contain the following parameters:
34
34
35
-
`blobgan_weights`: path to the weights file for the blobGan model
36
-
`encoder_weights`: path to the weights file for the image encoder
37
-
`decision_model_weights`: path to the weights file for the decision model to be explained
38
-
`device`: torch device to use for computation
39
-
`output_dir`: directory where generated images will be saved
40
-
`real_images`: a boolean indicating whether real images should be used (True) or generated images should be used (False)
41
-
`dataset_path`: path to the directory containing the images to use (if `real_images` is True)
42
-
`bs`: batch size to use when loading images from the dataset
43
-
`num_imgs`: number of images to generate (if `real_images` is False)
35
+
*`blobgan_weights`: path to the weights file for the blobGan model
36
+
*`encoder_weights`: path to the weights file for the image encoder
37
+
*`decision_model_weights`: path to the weights file for the decision model to be explained
38
+
*`device`: torch device to use for computation
39
+
*`output_dir`: directory where generated images will be saved
40
+
*`real_images`: a boolean indicating whether real images should be used (True) or generated images should be used (False)
41
+
*`dataset_path`: path to the directory containing the images to use (if `real_images` is True)
42
+
*`bs`: batch size to use when loading images from the dataset
43
+
*`num_imgs`: number of images to generate (if `real_images` is False)
44
44
45
45
Once you have created a `Config` object, you can instantiate an OCTET object with `octet = OCTET(config)`. You can then call the following methods on the OCTET object: `octet.invert_and_cf()` that will invert the image to get the latent code and generate the counterfactual explanation.
0 commit comments