
from __future__ import absolute_import, division, print_function

from lucid.misc.io.sanitizing import sanitize
from lucid.misc.io import load

import numpy as np

PATH_TEMPLATE = "gs://modelzoo/aligned-activations/{}/{}-{:05d}-of-01000.npy"
PAGE_SIZE = 10000
NUMBER_OF_AVAILABLE_SAMPLES = 100000
assert NUMBER_OF_AVAILABLE_SAMPLES % PAGE_SIZE == 0
NUMBER_OF_PAGES = NUMBER_OF_AVAILABLE_SAMPLES // PAGE_SIZE


def get_aligned_activations(layer):
    activation_paths = [
        PATH_TEMPLATE.format(sanitize(layer.model_class.name), sanitize(layer.name), page)
        for page in range(NUMBER_OF_PAGES)
    ]
    print(activation_paths)
    activations = [load(path) for path in activation_paths]
    return np.vstack(activations)


from __future__ import absolute_import, division, print_function

from lucid.misc.io.sanitizing import sanitize
from lucid.misc.io import load

import numpy as np

PATH_TEMPLATE = "gs://modelzoo/aligned-activations/{}/{}-{:05d}-of-01000.npy"
PAGE_SIZE = 10000
NUMBER_OF_AVAILABLE_SAMPLES = 100000
assert NUMBER_OF_AVAILABLE_SAMPLES % PAGE_SIZE == 0
NUMBER_OF_PAGES = NUMBER_OF_AVAILABLE_SAMPLES // PAGE_SIZE


def get_aligned_activations(layer):
    activation_paths = [
        PATH_TEMPLATE.format(sanitize(layer.model_class.name), sanitize(layer.name), page)
        for page in range(NUMBER_OF_PAGES)
    ]
    activations = [load(path) for path in activation_paths]
    return np.vstack(activations)

Remove stray print statement O_o
Remove stray print statement O_o

  
  from __future__ import absolute_import, division, print_function
  
  from lucid.misc.io.sanitizing import sanitize
  from lucid.misc.io import load
  
  import numpy as np
  
  PATH_TEMPLATE = "gs://modelzoo/aligned-activations/{}/{}-{:05d}-of-01000.npy"
  PAGE_SIZE = 10000
  NUMBER_OF_AVAILABLE_SAMPLES = 100000
  assert NUMBER_OF_AVAILABLE_SAMPLES % PAGE_SIZE == 0
  NUMBER_OF_PAGES = NUMBER_OF_AVAILABLE_SAMPLES // PAGE_SIZE
  
  
  def get_aligned_activations(layer):
      activation_paths = [
          PATH_TEMPLATE.format(sanitize(layer.model_class.name), sanitize(layer.name), page)
          for page in range(NUMBER_OF_PAGES)
      ]
-     print(activation_paths)
      activations = [load(path) for path in activation_paths]
      return np.vstack(activations)
  
Remove stray print statement O_o
## Code Before:

from __future__ import absolute_import, division, print_function

from lucid.misc.io.sanitizing import sanitize
from lucid.misc.io import load

import numpy as np

PATH_TEMPLATE = "gs://modelzoo/aligned-activations/{}/{}-{:05d}-of-01000.npy"
PAGE_SIZE = 10000
NUMBER_OF_AVAILABLE_SAMPLES = 100000
assert NUMBER_OF_AVAILABLE_SAMPLES % PAGE_SIZE == 0
NUMBER_OF_PAGES = NUMBER_OF_AVAILABLE_SAMPLES // PAGE_SIZE


def get_aligned_activations(layer):
    activation_paths = [
        PATH_TEMPLATE.format(sanitize(layer.model_class.name), sanitize(layer.name), page)
        for page in range(NUMBER_OF_PAGES)
    ]
    print(activation_paths)
    activations = [load(path) for path in activation_paths]
    return np.vstack(activations)

## Instruction:
Remove stray print statement O_o
## Code After:

from __future__ import absolute_import, division, print_function

from lucid.misc.io.sanitizing import sanitize
from lucid.misc.io import load

import numpy as np

PATH_TEMPLATE = "gs://modelzoo/aligned-activations/{}/{}-{:05d}-of-01000.npy"
PAGE_SIZE = 10000
NUMBER_OF_AVAILABLE_SAMPLES = 100000
assert NUMBER_OF_AVAILABLE_SAMPLES % PAGE_SIZE == 0
NUMBER_OF_PAGES = NUMBER_OF_AVAILABLE_SAMPLES // PAGE_SIZE


def get_aligned_activations(layer):
    activation_paths = [
        PATH_TEMPLATE.format(sanitize(layer.model_class.name), sanitize(layer.name), page)
        for page in range(NUMBER_OF_PAGES)
    ]
    activations = [load(path) for path in activation_paths]
    return np.vstack(activations)
