Skip to content

ValueError: 'axis' entry is out of bounds in acgan_unsw.py #3

@deepakkuk

Description

@deepakkuk

alueError Traceback (most recent call last)
in ()
120
121 # Generate fake attacking data using GAN
--> 122 fake_dataset, fake_labels = generate_fake_data(train_dataset, train_labels)
123 # Mix fake and real data to do supervised learning
124 mixed_dataset = np.concatenate((train_dataset, fake_dataset), axis=0)

in generate_fake_data(dataset, labels)
39 # Plot 100 samples of real/fake data
40 plot_traffic_as_image(dataset, labels, attack_signature,
---> 41 'real_attack', 100, gan.dirname)
42 plot_traffic_as_image(dataset, labels, normal_signature,
43 'real_normal', 100, gan.dirname)

/workspace/text2/netlearner/utils.pyc in plot_traffic_as_image(dataset, labels, signiture, name, num_samples, dirname)
335 def plot_traffic_as_image(dataset, labels, signiture,
336 name, num_samples, dirname='UNSW'):
--> 337 index = np.where(np.all(labels == signiture, axis=1))[0]
338 matches = dataset[index, :]
339 print('Real %s set' % name, matches.shape)

/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in all(a, axis, out, keepdims)
2040
2041 try:
-> 2042 return arr.all(axis=axis, out=out, keepdims=keepdims)
2043 except TypeError:
2044 return arr.all(axis=axis, out=out)

/usr/local/lib/python2.7/dist-packages/numpy/core/_methods.pyc in _all(a, axis, dtype, out, keepdims)
39
40 def _all(a, axis=None, dtype=None, out=None, keepdims=False):
---> 41 return umr_all(a, axis, dtype, out, keepdims)
42
43 def _count_reduce_items(arr, axis):

ValueError: 'axis' entry is out of bounds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions