Spaces:
Runtime error
Runtime error
Converting floats to ints
Browse files
app.py
CHANGED
@@ -152,6 +152,12 @@ def optimize_network(
|
|
152 |
# torch.manual_seed(seed)
|
153 |
# random.seed(seed)
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
make_cutouts = MakeCutouts(clip_models[clip_model].visual.input_resolution, cutn)
|
156 |
loss_fn = CLIPActivationLoss(clip_models[clip_model].visual.transformer.resblocks[layer],
|
157 |
neuron, class_token, maximize)
|
|
|
152 |
# torch.manual_seed(seed)
|
153 |
# random.seed(seed)
|
154 |
|
155 |
+
layer = int(layer)
|
156 |
+
cutn = int(cutn)
|
157 |
+
num_iterations = int(num_iterations)
|
158 |
+
neuron = int(neuron)
|
159 |
+
display_rate = int(display_rate)
|
160 |
+
|
161 |
make_cutouts = MakeCutouts(clip_models[clip_model].visual.input_resolution, cutn)
|
162 |
loss_fn = CLIPActivationLoss(clip_models[clip_model].visual.transformer.resblocks[layer],
|
163 |
neuron, class_token, maximize)
|