Quansight-Labs / numpy.net

A port of NumPy to .Net
BSD 3-Clause "New" or "Revised" License
131 stars 14 forks source link

No random functions #3

Closed QadiymStewart closed 4 years ago

QadiymStewart commented 4 years ago

np.random.randn not found

np.random.uniform not found

are these function implemented as of yet?

KevinBaselinesw commented 4 years ago

No, these functions are not implemented yet.

My view is that there are many other existing open source .NET based random and statistics packages. It didn't seem like the best use of my time.

Can you make a case for making this functions a higher priority?

QadiymStewart commented 4 years ago

Basically trying to port this bit of code to C#

def generate(self, z=None, x_dim = 26, y_dim = 26, scale = 8.0):
""" Generate data by sampling from latent space.
If z is not None, data for this point in latent space is
generated. Otherwise, z is drawn from prior in latent
space.
"""
if z is None:
    z = np.random.uniform(-1.0, 1.0, size=(self.batch_size, self.z_dim)).astype(np.float32)
# Note: This maps to mean of distribution, we could alternatively
# sample from Gaussian distribution
G = self.generator(x_dim = x_dim, y_dim = y_dim, reuse = True)
x_vec, y_vec, r_vec = self._coordinates(x_dim, y_dim, scale = scale)
image = self.sess.run(G, feed_dict={self.z: z, self.x: x_vec, self.y: y_vec, self.r: r_vec})
return image

I can use NumSharp Nuget for the np.random.uniform funtion but then i cannot map there NDArray type back to NumpyDotnet ndarray. You got any in site on how to map back to ndarray type your lib is using?

KevinBaselinesw commented 4 years ago

1) If you already using the NumSharp product, why not stay with that? From what I can tell, it works pretty well and it is very fast. It does require python which not everyone wants to deal with. But if you are using their product you already have python installed.

2) If you can get the raw data from their NDArray, you should be able to pass it to my library using one of the np.array() functions. Make sure the copy flag is set to true.

3) If you just want to use my library, can you generate random numbers using some other library? I think there are plenty of samples on the internet for generating random numbers so you can maybe build your own generator tool?

QadiymStewart commented 4 years ago

NumSharp is missing some key functionalities as well such as np.tile. I ended up using the second solution. zZ = np.array(NumSharp.np.random.uniform(-1.0, 1.0, shape).astype(NumSharp.np.float32),copy: true);

QadiymStewart commented 4 years ago

Can't wait for your np.random implementation want to rewrite my numsharp code and see how your library performs

KevinBaselinesw commented 4 years ago

Which functions of the np.random API are you using?

I definitely don’t have to time to reproduce the entire API.

From: Qadiym Stewart notifications@github.com Sent: Tuesday, February 25, 2020 12:42 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Can't wait for your np.random implementation want to rewrite my numsharp code and see how your library performs

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWXLM7JR7SPG2HPBAKTRESVQ3A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2UNOQ#issuecomment-590694074 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWV2TCE5SN7UNNLBRGTRESVQ3ANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWXAJS7NOCMNHAMQKX3RESVQ3A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2UNOQ.gif

QadiymStewart commented 4 years ago

import numpy

basic parameters

seed = 1337 # PRNG seed L = 8 # number of layers H = 32 # hidden layer size O = 3 # O=3 for RGB, O=1 for grayscale nrows = 512 # height of the output image ncols = 512 # width of the output image

construct a 2D array in which each row has numbers between -1.0 and 1.0

rowmat = (numpy.tile(numpy.linspace(0, nrows-1, nrows, dtype=numpy.float32), ncols).reshape(ncols, nrows).T - nrows/2.0)/(min(nrows, ncols)/2.0)

construct a 2D array in which each column has numbers between -1.0 and 1.0

colmat = (numpy.tile(numpy.linspace(0, ncols-1, ncols, dtype=numpy.float32), nrows).reshape(nrows, ncols) - ncols/2.0)/(min(nrows, ncols)/2.0)

stack the obtained arrays together and reshape the result into a (nrows*ncols)x3 matrix that will be the input to the CPPN

inputs = [rowmat, colmat, numpy.sqrt(numpy.power(rowmat, 2)+numpy.power(colmat, 2))] inputs = numpy.stack(inputs).transpose(1, 2, 0).reshape(-1, len(inputs))

init the PRNG seed

if seed is not None: numpy.random.seed(seed)

apply the CPPN

(note that we generate its weights on the fly and never store them)

results = inputs.copy() for i in range(0, L): if i==L-1: W = numpy.random.randn(results.shape[1], O) else: W = numpy.random.randn(results.shape[1], H) results = numpy.tanh(numpy.matmul(results, W))

rescale the input to (0.0, 1.0)

results = (1 + results)/2.0

reshape the result into an image and convert its pixels to uint8 numbers

results = (255.0*results.reshape(nrows, ncols, results.shape[-1])).astype(numpy.uint8)

optional: save the result to file

QadiymStewart commented 4 years ago

Basically trying to recreate that code

KevinBaselinesw commented 4 years ago

I have generated a new release and pushed it to nuget. Much higher performance. I also add np.random functions and np.matmul so you could complete this sample.

I ported the sample you sent. See it below. It seems to work great.

   int? seed = 1337;    //PRNG seed

        int L = 8;          //number of layers

        int H = 32;         //hidden layer size

        int O = 3;          // O=3 for RGB, O=1 for grayscale

        int nrows = 512;    //height of the output image

        int ncols = 512;    // width of the output image

        //construct a 2D array in which each row has numbers between -1.0 and 1.0

        double ret_step = 0;

        ndarray rowmat = (np.tile(np.linspace(0, nrows - 1, ref ret_step, nrows, dtype: np.Float32), ncols).reshape(ncols, nrows).T - nrows / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        print(rowmat.shape);

        // construct a 2D array in which each column has numbers between -1.0 and 1.0

        ndarray colmat = (np.tile(np.linspace(0, ncols - 1, ref ret_step, ncols, dtype: np.Float32), nrows).reshape(nrows, ncols) - ncols / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        print(colmat.shape);

        //stack the obtained arrays together and reshape the result into a(nrows * ncols)x3 matrix that will be the input to the CPPN

        List<ndarray> inputs = new List<ndarray>();

        inputs.Add(rowmat);

        inputs.Add(colmat);

        inputs.Add(np.sqrt(np.power(rowmat, 2) + np.power(colmat, 2)));

        ndarray inputstack = np.stack(inputs.ToArray()).Transpose(new npy_intp[] { 1, 2, 0 }).reshape(-1, inputs.Count);

        //init the PRNG seed

        if (seed != null)

        {

            np.random.seed(seed);

        }

        //apply the CPPN (note that we generate its weights on the fly and never store them)

        ndarray W;

        var results = inputstack.Copy();

        for (int i = 0; i < L; i++)

        {

            if (i == L - 1)

                W = np.random.randn(results.shape.iDims[1], O);

            else

                W = np.random.randn(results.shape.iDims[1], H);

            results = np.tanh(np.matmul(results, W));

        }

        //rescale the input to(0.0, 1.0)

        results = (1 + results) / 2.0;

        //reshape the result into an image and convert its pixels to uint8 numbers

        results = (255.0 * results.reshape(nrows, ncols, results.shape.iDims[results.shape.iDims.Length-1])).astype(np.UInt8);

        print(results.shape);

        return;

From: Qadiym Stewart notifications@github.com Sent: Saturday, February 29, 2020 12:44 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Basically trying to recreate that code

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWXIWWWUVDQLO2TQTW3RFFEPRA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMA3IA#issuecomment-592973216 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQVFYOMJOH752JIMNTRFFEPRANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWXYDCDF4NTZLBJ3FJDRFFEPRA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMA3IA.gif

QadiymStewart commented 4 years ago

I have generated a new release and pushed it to nuget. Much higher performance. I also add np.random functions and np.matmul so you could complete this sample. I ported the sample you sent. See it below. It seems to work great. int? seed = 1337; //PRNG seed int L = 8; //number of layers int H = 32; //hidden layer size int O = 3; // O=3 for RGB, O=1 for grayscale int nrows = 512; //height of the output image int ncols = 512; // width of the output image //construct a 2D array in which each row has numbers between -1.0 and 1.0 double ret_step = 0; ndarray rowmat = (np.tile(np.linspace(0, nrows - 1, ref ret_step, nrows, dtype: np.Float32), ncols).reshape(ncols, nrows).T - nrows / 2.0) / (Math.Min(nrows, ncols) / 2.0); print(rowmat.shape); // construct a 2D array in which each column has numbers between -1.0 and 1.0 ndarray colmat = (np.tile(np.linspace(0, ncols - 1, ref ret_step, ncols, dtype: np.Float32), nrows).reshape(nrows, ncols) - ncols / 2.0) / (Math.Min(nrows, ncols) / 2.0); print(colmat.shape); //stack the obtained arrays together and reshape the result into a(nrows ncols)x3 matrix that will be the input to the CPPN List inputs = new List(); inputs.Add(rowmat); inputs.Add(colmat); inputs.Add(np.sqrt(np.power(rowmat, 2) + np.power(colmat, 2))); ndarray inputstack = np.stack(inputs.ToArray()).Transpose(new npy_intp[] { 1, 2, 0 }).reshape(-1, inputs.Count); //init the PRNG seed if (seed != null) { np.random.seed(seed); } //apply the CPPN (note that we generate its weights on the fly and never store them) ndarray W; var results = inputstack.Copy(); for (int i = 0; i < L; i++) { if (i == L - 1) W = np.random.randn(results.shape.iDims[1], O); else W = np.random.randn(results.shape.iDims[1], H); results = np.tanh(np.matmul(results, W)); } //rescale the input to(0.0, 1.0) results = (1 + results) / 2.0; //reshape the result into an image and convert its pixels to uint8 numbers results = (255.0 results.reshape(nrows, ncols, results.shape.iDims[results.shape.iDims.Length-1])).astype(np.UInt8); print(results.shape); return; From: Qadiym Stewart notifications@github.com Sent: Saturday, February 29, 2020 12:44 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3) Basically trying to recreate that code — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3?email_source=notifications&email_token=ACP4GWXIWWWUVDQLO2TQTW3RFFEPRA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMA3IA#issuecomment-592973216> , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQVFYOMJOH752JIMNTRFFEPRANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWXYDCDF4NTZLBJ3FJDRFFEPRA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENMA3IA.gif

Thanks very much.

QadiymStewart commented 4 years ago

if i change output to 1 ( int O = 3; // O=3 for RGB, O=1 for grayscale) getting System.Exception: '(NpyExc_ValueError) _fix_unknown_dimension: total size of new array must be unchanged' also new npy_intp[] { 1, 2, 0 } i'm assuming its an int array but getting error expecting long array

KevinBaselinesw commented 4 years ago

npy_intp Is Int64. Make that change and try again. This is an old Numpy issue as to whether optimal speed is best with intp as 32 or 64.

I will investigate what happens if I set O=1.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 6:41 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

if i change output to 1 ( int O = 3; // O=3 for RGB, O=1 for grayscale) getting System.Exception: '(NpyExc_ValueError) _fix_unknown_dimension: total size of new array must be unchanged' also new npy_intp[] { 1, 2, 0 } i'm assuming its an int array but getting error expecting long array

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWXDGBCASHJVX3LTWC3RFOLNXA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENO7YSQ#issuecomment-593361994 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWVXMF7SCHDQJGVYY6TRFOLNXANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWRMBQIWQTWI2HBINQ3RFOLNXA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENO7YSQ.gif

QadiymStewart commented 4 years ago

i ending up with this code to get it working, the output results aren't as expected so debugging to see whats going on now. Output reference https://tehnokv.com/posts/visualizing-audio-with-cppns/ just to first part (Implementation using numpy):

using System; using System.Collections.Generic; using System.Text; using NumpyDotNet;

using NumpyLib; using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; using npy_intp = System.Int64;

namespace CSHARPCPPN { public class NumpyGen { public NumpyGen() { int? seed = 1358; //PRNG seed

        int L = 8;          //number of layers

        int H = 32;         //hidden layer size

        int O = 1;          // O=3 for RGB, O=1 for grayscale

        int nrows = 150;    //height of the output image

        int ncols = 150;    // width of the output image

        //construct a 2D array in which each row has numbers between -1.0 and 1.0

        double ret_step = 0;

        ndarray rowmat = (np.tile(np.linspace(0, nrows - 1, ref ret_step, nrows, dtype: np.Float32), ncols).reshape(ncols, nrows).T - nrows / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        Console.WriteLine(rowmat.shape);

        // construct a 2D array in which each column has numbers between -1.0 and 1.0

        ndarray colmat = (np.tile(np.linspace(0, ncols - 1, ref ret_step, ncols, dtype: np.Float32), nrows).reshape(nrows, ncols) - ncols / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        Console.WriteLine(colmat.shape);

        //stack the obtained arrays together and reshape the result into a(nrows * ncols)x3 matrix that will be the input to the CPPN

        List<ndarray> inputs = new List<ndarray>();

        inputs.Add(rowmat);

        inputs.Add(colmat);

        inputs.Add(np.sqrt(np.power(rowmat, 2) + np.power(colmat, 2)));

        ndarray inputstack = np.stack(inputs.ToArray()).Transpose(new Int64[] { 1, 2, 0 }).reshape(-1, inputs.Count);

        //init the PRNG seed

        if (seed != null)

        {
            np.random.seed(seed);
        }

        //apply the CPPN (note that we generate its weights on the fly and never store them)

        ndarray W;

        var results = inputstack.Copy();

        for (int i = 0; i < L; i++)

        {
            if (i == L - 1)

                W = np.random.randn(results.shape.iDims[1], O);
            else

                W = np.random.randn(results.shape.iDims[1], H);

            results = np.tanh(np.matmul(results, W));
        }

        //rescale the input to(0.0, 1.0)

        results = (1 + results) / 2.0;

        //reshape the result into an image and convert its pixels to uint8 numbers

        results = (255.0 * results.reshape(nrows, ncols, -1)).astype(np.UInt8);

        var barray = results.tobytes();

        using Image<Rgba32> image = new Image<Rgba32>(ncols, nrows);

        var Count = 0;

        for (int y = 0; y < ncols; y++)
        {
            for (int x = 0; x < nrows; x++)
            {
                Rgba32 pixel = image[x, y];
                pixel.R = barray[Count];
                pixel.G = barray[Count]; ;
                pixel.B = barray[Count]; ;
                pixel.A = 255;
                image[x, y] = pixel;
                Count++;
            }
        }

        image.Save(@"C:\Users\qadiy\Desktop\CSHARPCPPN\CSHARPCPPN\test3.jpg");

        Console.WriteLine(results.shape);

        return;
    }
}

}

KevinBaselinesw commented 4 years ago

If you are expecting the random number generators to return the same numbers so that you get the exact same results, that is not going to happen.

We are feeding the same seed value in but the random number generators are different so they will produce different results.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 7:06 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

i ending up with this code to get it working, the output results aren't as expected so debugging to see whats going on now. Output reference https://tehnokv.com/posts/visualizing-audio-with-cppns/ just to first part (Implementation using numpy):

using System; using System.Collections.Generic; using System.Text; using NumpyDotNet;

using NumpyLib; using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; using npy_intp = System.Int64;

namespace CSHARPCPPN { public class NumpyGen { public NumpyGen() { int? seed = 1358; //PRNG seed

    int L = 8;          //number of layers

    int H = 32;         //hidden layer size

    int O = 1;          // O=3 for RGB, O=1 for grayscale

    int nrows = 150;    //height of the output image

    int ncols = 150;    // width of the output image

    //construct a 2D array in which each row has numbers between -1.0 and 1.0

    double ret_step = 0;

    ndarray rowmat = (np.tile(np.linspace(0, nrows - 1, ref ret_step, nrows, dtype: np.Float32), ncols).reshape(ncols, nrows).T - nrows / 2.0) / (Math.Min(nrows, ncols) / 2.0);

    Console.WriteLine(rowmat.shape);

    // construct a 2D array in which each column has numbers between -1.0 and 1.0

    ndarray colmat = (np.tile(np.linspace(0, ncols - 1, ref ret_step, ncols, dtype: np.Float32), nrows).reshape(nrows, ncols) - ncols / 2.0) / (Math.Min(nrows, ncols) / 2.0);

    Console.WriteLine(colmat.shape);

    //stack the obtained arrays together and reshape the result into a(nrows * ncols)x3 matrix that will be the input to the CPPN

    List<ndarray> inputs = new List<ndarray>();

    inputs.Add(rowmat);

    inputs.Add(colmat);

    inputs.Add(np.sqrt(np.power(rowmat, 2) + np.power(colmat, 2)));

    ndarray inputstack = np.stack(inputs.ToArray()).Transpose(new Int64[] { 1, 2, 0 }).reshape(-1, inputs.Count);

    //init the PRNG seed

    if (seed != null)

    {
        np.random.seed(seed);
    }

    //apply the CPPN (note that we generate its weights on the fly and never store them)

    ndarray W;

    var results = inputstack.Copy();

    for (int i = 0; i < L; i++)

    {
        if (i == L - 1)

            W = np.random.randn(results.shape.iDims[1], O);
        else

            W = np.random.randn(results.shape.iDims[1], H);

        results = np.tanh(np.matmul(results, W));
    }

    //rescale the input to(0.0, 1.0)

    results = (1 + results) / 2.0;

    //reshape the result into an image and convert its pixels to uint8 numbers

    results = (255.0 * results.reshape(nrows, ncols, -1)).astype(np.UInt8);

    var barray = results.tobytes();

    using Image<Rgba32> image = new Image<Rgba32>(ncols, nrows);

    var Count = 0;

    for (int y = 0; y < ncols; y++)
    {
        for (int x = 0; x < nrows; x++)
        {
            Rgba32 pixel = image[x, y];
            pixel.R = barray[Count];
            pixel.G = barray[Count]; ;
            pixel.B = barray[Count]; ;
            pixel.A = 255;
            image[x, y] = pixel;
            Count++;
        }
    }

    image.Save(@"C:\Users\qadiy\Desktop\CSHARPCPPN\CSHARPCPPN\test3.jpg");

    Console.WriteLine(results.shape);

    return;
}

}

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWU2HNH3NHCW4ZYX2E3RFOOKDA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPB2VA#issuecomment-593370452 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWVHLT4NYJP4QJEKDY3RFOOKDANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWVWB2IRDZ4FWYOXUA3RFOOKDA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPB2VA.gif

QadiymStewart commented 4 years ago

Not expecting the exact same image/results (image based on the article) but when a seed is passed in it should be able to reproduce the same images in our code. So according to numpy if a seed is passed to the random gen then all values of random be the same instance according to that seed. I Don't think the problem is your random function. It's probably somewhere else still debugging. the images that it's producing are just a straight line or jagged lines no smoothness
test3

QadiymStewart commented 4 years ago

Compared to g4

QadiymStewart commented 4 years ago

I'm just happy you got some random and matmul functions working now i can rewrite the python code. I know your a busy guy.

KevinBaselinesw commented 4 years ago

I just pushed up a bug fix version for you. It should fix the “int O = 3; // O=3 for RGB, O=1 for grayscale “ problem that you hit. This was a defect in my new np.matmul function. That needs some maturity.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 7:32 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

I'm just happy you got some random and matmul functions working now i can rewrite the python code. I know your a busy guy.

— You are receiving this because you commented. Reply to this email directly, https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWVZHRRD27NHOWXRIQTRFORNVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPEDAQ#issuecomment-593379714 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/ACP4GWQOWPHUX7FNY4DIRS3RFORNVANCNFSM4KTW4HOA unsubscribe. https://github.com/notifications/beacon/ACP4GWVVI65BFKCS4WQTYELRFORNVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPEDAQ.gif

QadiymStewart commented 4 years ago

alright thanks will check it out

KevinBaselinesw commented 4 years ago

Another possibility is that we are losing resolution in the call to np.tanh. I don’t about python, but in my library, we call the standard .NET Math.Tanh function which only works for doubles. That means we are converting your input floats to doubles, performing the tanh and then converting it back to float. We could be losing some resolution that is causing your blurriness.

Below is a sample that uses double instead of float. For random numbers, I call np.random.randd Instead of np.random.randn.

       int? seed = 1337;    //PRNG seed

        int L = 8;          //number of layers

        int H = 32;         //hidden layer size

        int O = 1;          // O=3 for RGB, O=1 for grayscale

        int nrows = 512;    //height of the output image

        int ncols = 512;    // width of the output image

        //construct a 2D array in which each row has numbers between -1.0 and 1.0

        double ret_step = 0;

        ndarray rowmat = (np.tile(np.linspace(0, nrows - 1, ref ret_step, nrows, dtype: np.Float64), ncols).reshape(ncols, nrows).T - nrows / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        print(rowmat.shape);

        // construct a 2D array in which each column has numbers between -1.0 and 1.0

        ndarray colmat = (np.tile(np.linspace(0, ncols - 1, ref ret_step, ncols, dtype: np.Float64), nrows).reshape(nrows, ncols) - ncols / 2.0) / (Math.Min(nrows, ncols) / 2.0);

        print(colmat.shape);

        //stack the obtained arrays together and reshape the result into a(nrows * ncols)x3 matrix that will be the input to the CPPN

        List<ndarray> inputs = new List<ndarray>();

        inputs.Add(rowmat);

        inputs.Add(colmat);

        inputs.Add(np.sqrt(np.power(rowmat, 2) + np.power(colmat, 2)));

        ndarray inputstack = np.stack(inputs.ToArray()).Transpose(new npy_intp[] { 1, 2, 0 }).reshape(-1, inputs.Count);

        //init the PRNG seed

        if (seed != null)

        {

            np.random.seed(seed);

        }

        //apply the CPPN (note that we generate its weights on the fly and never store them)

        ndarray W;

        var results = inputstack.Copy();

        for (int i = 0; i < L; i++)

        {

            if (i == L - 1)

                W = np.random.randd(results.shape.iDims[1], O);

            else

                W = np.random.randd(results.shape.iDims[1], H);

            results = np.tanh(np.matmul(results, W));

        }

        //rescale the input to(0.0, 1.0)

        results = (1 + results) / 2.0;

        //reshape the result into an image and convert its pixels to uint8 numbers

        results = (255.0 * results.reshape(nrows, ncols, results.shape.iDims[results.shape.iDims.Length - 1])).astype(np.UInt8);

        print(results.shape);

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 7:32 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

I'm just happy you got some random and matmul functions working now i can rewrite the python code. I know your a busy guy.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWVZHRRD27NHOWXRIQTRFORNVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPEDAQ#issuecomment-593379714 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQOWPHUX7FNY4DIRS3RFORNVANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWVVI65BFKCS4WQTYELRFORNVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPEDAQ.gif

QadiymStewart commented 4 years ago

I highly doubt it's the resolution lost. The image would be very grainy almost like random noise. The results I'm getting is more of a uniform block it's like the values are getting rounded to either 1's or 0's I'm rewrite the NumSharp code I wrote before to see how it performs using your lib its a bit longer than the example provided. If you want to take a look let me know. Thanks for all your help.

KevinBaselinesw commented 4 years ago

I think I found the problem. The np.random.rand was not producing random numbers in the expected range. That was causing the np.tanh function to produce all 1.0 as output which caused your algorithm to be to be off. I just uploaded a fix for it.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 8:55 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

I highly doubt it's the resolution lost. The image would be very grainy almost like random noise. The results I'm getting is more of a uniform block it's like the values are getting rounded to either 1's or 0's I'm rewrite the NumSharp code I wrote before to see how it performs using your lib its a bit longer than the example provided. If you want to take a look let me know. Thanks for all your help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWQ224FD6Y23KT4ROALRFO3DXA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPMK6A#issuecomment-593413496 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWT3AGPTA43EAMAY35TRFO3DXANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWVRH5DFEWQLYAA2X5TRFO3DXA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPMK6A.gif

QadiymStewart commented 4 years ago

Thanks will take a look. Was just going to see if you can produce a np.random.randdecimal version of randint. Should replicate numpy's random uniform method. Studying your library structure so I can send pull request in the future. ;)

QadiymStewart commented 4 years ago

New code same output. Give me about an hour I'll finish porting the code to your lib and compare the working NumSharp output line by line to see where that values are off.

KevinBaselinesw commented 4 years ago

The random number generator does not produce decimal numbers.

I suggest that you call randd to get an array of random doubles (not range checked like randn) and then call astype(np.Decimal) on the output array.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 10:30 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Thanks will take a look. Was just going to see if you can produce a np.random.randdecimal version of randint. Should replicate numpy's random uniform method. Studying your library structure so I can send pull request in the future. ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWSQCJ4YCC7NOCXOOMLRFPGIJA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPXT5Y#issuecomment-593459703 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWVVZK5KXUWAG6QCEZ3RFPGIJANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWSNWFDRN22U5YX4YI3RFPGIJA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPXT5Y.gif

KevinBaselinesw commented 4 years ago

Make sure you have the latest v9.35.2 to get the randn fix. I am surprised you got the same result. I tested it quickly and saw what looked like better output from the np.tanh function.

On my way to the office now. I will try to work on this later tonight if necessary.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 10:41 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

New code same output. Give me about an hour I'll finish porting the code to your lib and compare the working NumSharp output line by line to see where that values are off.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWXXUUGZAAAZITTDF7LRFPHSBA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPY7AA#issuecomment-593465216 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWWENK2IGAO5LWYWRM3RFPHSBANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWQSS5DVMNBIT3OJ4ZLRFPHSBA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENPY7AA.gif

QadiymStewart commented 4 years ago

Still not getting expected results. I create a repo with working NumSharp code and NumpyDotnet code for comparison. https://twinnaz.visualstudio.com/CSHARPCPPN/_git/CSHARPCPPN

"The random number generator does not produce decimal numbers. I suggest that you call randd to get an array of random doubles (not range checked like randn) and then call astype(np.Decimal) on the output array."

np.random.uniform(-1, 1, new int[] { Batch_Size, H_Size }); Takes in low and high range and shape. Should be able to get both negative and positive decimals. Your random functions will clamp to values between 0 - 1 and the closes thing you have is randint or randint64 whice only gives ints no floating point output . Also if I use c# Random() method then i'll be unable to reproduce the same values when a seed is provided.

KevinBaselinesw commented 4 years ago

My implementation of the np.random library uses the c# random numbers. https://docs.microsoft.com/en-us/dotnet/api/system.random?view=netframework-4.8

I may be confused by what you are saying, but the C# random library DOES allow for a seed value to be entered. I support that in the same way that python does.

 np.random.seed(8765);  <----  fixed seed will reproduce same numbers over and over.

FYI, If you need a tool to reproduce the exact series of random numbers that the python code produces when seeded, I will be unable to help you. I cannot reproduce the huge numpy library that generates those numbers. The NumSharp tool uses interop into python to make their random numbers so they can reproduce the same values. Have you figured out a way to get access to the underlying C# array from their code? If you can, you can pass it to my code.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 2:30 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Still not getting expected results. I create a repo with working NumSharp code and NumpyDotnet code for comparison. https://twinnaz.visualstudio.com/CSHARPCPPN/_git/CSHARPCPPN

"The random number generator does not produce decimal numbers. I suggest that you call randd to get an array of random doubles (not range checked like randn) and then call astype(np.Decimal) on the output array."

np.random.uniform(-1, 1, new int[] { Batch_Size, H_Size }); Takes in low and high range and shape. Should be able to get both negative and positive decimals. Your random functions will clamp to values between 0 - 1 and the closes thing you have is randint or randint64 whice only gives ints no floating point output . Also if I use c# Random() method then i'll be unable to reproduce the same values when a seed is provided.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWSHXK3WUX6CD63WMZTRFQCKZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQUAEQ#issuecomment-593575954 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWX2N5YZYYE32T3YXKTRFQCKZANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWWP5U5UY2Q5B7TRGJ3RFQCKZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQUAEQ.gif

KevinBaselinesw commented 4 years ago

I compared your ArtGenNumpyDotNet.cs and ArtGenNumSharp.cs and found two differences that may be important.

  1. At line 106 of ArtGetNumpyDotNet.cs, you pass a false to FullyConnected while ArtGenNumSharp.cs pass true.
  2. The default values for TanhSig are different.

I adjusted both values and they impact the generated output.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 2:30 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Still not getting expected results. I create a repo with working NumSharp code and NumpyDotnet code for comparison. https://twinnaz.visualstudio.com/CSHARPCPPN/_git/CSHARPCPPN

"The random number generator does not produce decimal numbers. I suggest that you call randd to get an array of random doubles (not range checked like randn) and then call astype(np.Decimal) on the output array."

np.random.uniform(-1, 1, new int[] { Batch_Size, H_Size }); Takes in low and high range and shape. Should be able to get both negative and positive decimals. Your random functions will clamp to values between 0 - 1 and the closes thing you have is randint or randint64 whice only gives ints no floating point output . Also if I use c# Random() method then i'll be unable to reproduce the same values when a seed is provided.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWSHXK3WUX6CD63WMZTRFQCKZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQUAEQ#issuecomment-593575954 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWX2N5YZYYE32T3YXKTRFQCKZANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWWP5U5UY2Q5B7TRGJ3RFQCKZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENQUAEQ.gif

QadiymStewart commented 4 years ago

No sorry for the confusing. I don't expect the exact same outputs that'll be next to impossible. What I meant was I expect the similar function. For example. NumSharp:
vector = np.random.uniform(-1, 1, new int[] {1, 4 }); will give me 4 random numbers between the range of -1 and 1 as decimals.

but for Numpydotnet or C# there's no equivalent function unless I implement my own. You have randint and randint64 but being integers you'll lose the precision of decimals.

Also even with the two minor fixes it still doesn't produce similar results. so somewhere in on of the functions its not producing the right values but' i'll stick with numsharp until this library matures a bit more numpy numsh

KevinBaselinesw commented 4 years ago

I just added np.random.uniform to numpydotnet and pushed it up.

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 7:50 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

No sorry for the confusing. I don't expect the exact same outputs that'll be next to impossible. What I meant was I expect the similar function. For example. NumSharp: vector = np.random.uniform(-1, 1, new int[] {1, 4 }); will give me 4 random numbers between the range of -1 and 1 as decimals.

but for Numpydotnet or C# there's no equivalent function unless I implement my own. You have randint and randint64 but being integers you'll lose the precision of decimals.

Also even with the two minor fixes it still doesn't produce similar results. so somewhere in on of the functions its not producing the right values but' i'll stick with numsharp until this library matures a bit more https://user-images.githubusercontent.com/28968495/75731887-eb555080-5cbe-11ea-837a-58907d2c72e1.jpg https://user-images.githubusercontent.com/28968495/75731888-ed1f1400-5cbe-11ea-88ae-9ad5cd993323.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWV3E7B6YCXNAYUDH4DRFRHZ5A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENRUMXI#issuecomment-593708637 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQGEDBUKBNZMKKJMYLRFRHZ5ANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWSDYOLY3K3I6TPEH3TRFRHZ5A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENRUMXI.gif

KevinBaselinesw commented 4 years ago

I appreciate your help. I found the problems in my code. My recent attempts to speed up the calculations created two bugs that only impacted large arrays. My unit tests did not catch it because they generally operate on smaller arrays. I will fix that going forward.

I pushed a new release to nuget that solves the problems. I am able to get your code sample working correctly and produce the same result as python.

I have attached the working version of the software.

Thank you,

Kevin

From: Qadiym Stewart notifications@github.com Sent: Monday, March 2, 2020 7:50 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; Comment comment@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

No sorry for the confusing. I don't expect the exact same outputs that'll be next to impossible. What I meant was I expect the similar function. For example. NumSharp: vector = np.random.uniform(-1, 1, new int[] {1, 4 }); will give me 4 random numbers between the range of -1 and 1 as decimals.

but for Numpydotnet or C# there's no equivalent function unless I implement my own. You have randint and randint64 but being integers you'll lose the precision of decimals.

Also even with the two minor fixes it still doesn't produce similar results. so somewhere in on of the functions its not producing the right values but' i'll stick with numsharp until this library matures a bit more https://user-images.githubusercontent.com/28968495/75731887-eb555080-5cbe-11ea-837a-58907d2c72e1.jpg https://user-images.githubusercontent.com/28968495/75731888-ed1f1400-5cbe-11ea-88ae-9ad5cd993323.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWV3E7B6YCXNAYUDH4DRFRHZ5A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENRUMXI#issuecomment-593708637 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQGEDBUKBNZMKKJMYLRFRHZ5ANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWSDYOLY3K3I6TPEH3TRFRHZ5A5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENRUMXI.gif

using System; using System.Collections.Generic; using System.Text; using NumpyDotNet;

namespace CSHARPCPPN { public class ArtGenNumpyDotNet { public int BatchSize { get; set; } public int NetSize { get; set; } public int HSize { get; set; } public int Width { get; set; } public int Height { get; set; } public float Scaling { get; set; } public bool RGB { get; set; } public int C_Dim { get; set; } public int Num_Points { get; set; } public ndarray Img_Batch { get; set; } public ndarray Hid_Vec { get; set; } public ndarray X_Dat { get; set; } public ndarray Y_Dat { get; set; } public ndarray R_Dat { get; set; } public ndarray Art_Net { get; private set; }

    public void InitialiseCPPN(int batchSize = 1, int netSize = 32, int hSize = 32, int width = 256, int height = 256, float scaling = 1.0f, bool RGB = false)
    {
        //Setting Parameters

        BatchSize = batchSize;
        NetSize = netSize;
        HSize = hSize;
        Width = width;
        Height = height;
        Scaling = scaling;
        this.RGB = RGB;

        if (RGB)
        {
            C_Dim = 3;
        }
        else
        {
            C_Dim = 1;
        }

        Num_Points = width * height;

        // Configuring Network

        Img_Batch = np.random.standard_normal(new int[] { batchSize, width, height, C_Dim });

        Hid_Vec = np.random.standard_normal(new int[] { batchSize, hSize });

        X_Dat = np.random.standard_normal(batchSize, width * height, 1);
        Y_Dat = np.random.standard_normal(batchSize, width * height, 1);
        R_Dat = np.random.standard_normal(batchSize, width * height, 1);
    }

    public List<ndarray> CreateGrid(int width = 32, int height = 32, float scaling = 1.0f)
    {
        Num_Points = width * height;

        double ret_step = 0;
        ndarray x_range = np.linspace(-1 * scaling, scaling, ref ret_step, width);

        ndarray y_range = np.linspace(-1 * scaling, scaling, ref ret_step, height);

        ndarray x_mat = np.matmul(np.ones(new shape(height, 1)), x_range.reshape(1, width));

        ndarray y_mat = np.matmul(y_range.reshape(height, 1), np.ones(new shape(1, width)));

        ndarray r_mat = np.sqrt((x_mat * x_mat) + (y_mat * y_mat));

        x_mat = np.tile(x_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);
        y_mat = np.tile(y_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);
        r_mat = np.tile(r_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);

        return new List<ndarray>
        {
            x_mat,
            y_mat,
            r_mat
        };
    }

    public ndarray BuildCPPN(int width, int height, ndarray x_dat, ndarray y_dat, ndarray r_dat, ndarray hid_vec)
    {
        Num_Points = width * height;
        // Scale the hidden vector
        ndarray hid_vec_scaled = np.reshape(hid_vec, new shape(BatchSize, 1, HSize)) * np.ones((Num_Points, 1), dtype: np.Float32) * Scaling;

        //Unwrap the grid matrices

        ndarray x_dat_unwrapped = np.reshape(x_dat, new shape(BatchSize * Num_Points, 1));

        ndarray y_dat_unwrapped = np.reshape(y_dat, new shape(BatchSize * Num_Points, 1));

        ndarray r_dat_unwrapped = np.reshape(r_dat, new shape(BatchSize * Num_Points, 1));

        ndarray h_vec_unwrapped = np.reshape(hid_vec_scaled, new shape(BatchSize * Num_Points, HSize));

        //Build the network
        Art_Net = FullyConnected(h_vec_unwrapped, NetSize) +
            FullyConnected(x_dat_unwrapped, NetSize, false) +
            FullyConnected(y_dat_unwrapped, NetSize, true) +
            FullyConnected(r_dat_unwrapped, NetSize, false);

        //Set Activation function
        var output = TanhSig();

        var model = np.reshape(output, new shape(BatchSize, width, height, C_Dim));
        return model;
    }

    public ndarray TanhSig(int numOfLayers = 2)
    {
        var h = np.tanh(Art_Net);
        for (int i = 0; i < numOfLayers; i++)
        {
            h = np.tanh(FullyConnected(h, NetSize));
        };

        return Sigmoid(FullyConnected(h, C_Dim));
    }

    public ndarray SinTanhSof()
    {
        var h = np.tanh(Art_Net);
        h = 0.95 * np.sin(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        h = SoftPlus(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        return SoftPlus(FullyConnected(h, NetSize));
    }

    public ndarray TanhSigSinSof()
    {
        var h = np.tanh(Art_Net);
        h = 0.8 * np.sin(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        h = SoftPlus(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        return Sigmoid(FullyConnected(h, NetSize));
    }

    public ndarray FullyConnected(ndarray input, int out_dim, bool with_bias = true)
    {
        var mat = np.random.standard_normal((int)input.shape.iDims[1], out_dim).astype(np.Float32);

        var result = np.matmul(input, mat);

        if (with_bias)
        {
            var bias = np.random.standard_normal(1, out_dim).astype(np.Float32);
            result += bias * np.ones(new shape(input.shape.iDims[0], 1), np.Float32);
        }

        return result;
    }

    public ndarray Sigmoid(ndarray x)
    {
        return (np.array(1.0) / (1.0 + np.exp(-1 * x))) as ndarray;
    }

    public ndarray SoftPlus(ndarray x)
    {
        return np.log(1.0 + np.exp(x));
    }

    public ndarray Generate(int width = 256, int height = 256, float scaling = 20.0f, ndarray z = null)
    {
        //Generate Random Key to generate image
        var vector = z;
        if (vector == null)
        {
            vector = np.random.uniform(-1, 1, new int[] { BatchSize, HSize }).astype(np.Float32);
        }

        var data = CreateGrid(width, height, scaling);
        return BuildCPPN(width, height, data[0], data[1], data[2], vector);
    }

    public double[] GenerateArt(int batch_size = 1, int net_size = 16, int h_size = 8, int width = 512, int height = 512, float scaling = 10.0f, bool RGB = true, int? seed = null)
    {
        int? KeyId = null;
        if (seed != null)
        {
            KeyId = seed;
            np.random.seed(KeyId);
        }
        else
        {
            KeyId = Math.Abs(DateTime.Now.GetHashCode());
            np.random.seed(KeyId);
        }

        var art = new ArtGenNumpyDotNet();

        art.InitialiseCPPN(batch_size, net_size, RGB: RGB);

        if (RGB)
        {
            C_Dim = 3;
        }
        else
        {
            C_Dim = 1;
        }

        var imageData = art.Generate(width, height, scaling);

        var imgData = np.array(1 - imageData);
        if (C_Dim > 1)
        {
            imgData = np.array(imgData.reshape((height, width, C_Dim)) * 255.0);
        }
        else
        {
            imgData = np.array(imgData.reshape((height, width)) * 255.0);
        }

        return imgData.ToArray<double>();
    }
}

}

QadiymStewart commented 4 years ago

Thanks I'll take a look into it.

KevinBaselinesw commented 4 years ago

Hi Qadiym,

I am wondering if NumpyDotNet is working well for you now. Have you hit any other problems?

Do you need my help with anything?

kevin

From: Qadiym Stewart notifications@github.com Sent: Wednesday, March 4, 2020 10:03 AM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Thanks I'll take a look into it.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWUXODAKKKD442LEWXDRFZUTBA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENYJL2Y#issuecomment-594580971 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWR2SAHU5B27WQIHVK3RFZUTBANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWS6FAILV7SXWU45LMTRFZUTBA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENYJL2Y.gif

QadiymStewart commented 4 years ago

Still not working as expected. Somewhere the values are getting clipped.

KevinBaselinesw commented 4 years ago

I am not sure what you mean by “clipped”.

What I remember is that my numpydotnet code produced an image that seemed to be the same as the other system although the colors were inverted. I could not find what that problem was. I thought it might be in your code somewhere. I did np.sum(x) of each array after each calculation and compared them all the through to the end and they matched.

np.sum(x) just adds up all of the numbers in the array. That strongly suggests the numbers were the same although they could have been slightly out of order to produce the same result.

Also, I was using my np.random functions on the other implementation too. That allowed me to check very precisely the numbers that were being calculated.

Does that prompt your thinking? I can try to do a more detailed examination to make sure the data is exactly the same.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 7:02 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Still not working as expected. Somewhere the values are getting clipped.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWR3BUIE4V3RDYXSMM3RGA4PLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7KPYA#issuecomment-595503072 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWSPF7NG4R42AG47URDRGA4PLANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWSHDARWBSVQQU34TVTRGA4PLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7KPYA.gif

QadiymStewart commented 4 years ago

Which example are you testing with the first one or the repo I sent you? The output images don't seem identical to what a CPPN produces. The code is almost 1 to 1 except that Numsharp uses both Numsharp(missing tile function ) and numpydotnet . Results from Numpydotnet numpy

Results from NumSharp numsh

KevinBaselinesw commented 4 years ago

Here are two images I just produced. They are identical.

You probably need to nuget the latest version of my code V09.40.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 8:04 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Which example are you testing with the first one or the repo I sent you? The output images don't seem identical to what a CPPN produces. The code is almost 1 to 1 except that Numsharp uses both Numsharp(missing tile function ) and numpydotnet . Results from Numpydotnet https://user-images.githubusercontent.com/28968495/76039963-f8bb4680-5f1b-11ea-8b20-98ee3c3e709a.jpg

Results from NumSharp https://user-images.githubusercontent.com/28968495/76039990-0e307080-5f1c-11ea-8cce-10ff37bf2db4.jpg

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWRGVEQ3FRIYFQQD2Y3RGBDXLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7PQ4A#issuecomment-595523696 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWRX6F6UU6PYIJEX34LRGBDXLANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWT63S72JHILTUHBZM3RGBDXLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7PQ4A.gif

QadiymStewart commented 4 years ago

image

I don't see your images and i'm on latest.

KevinBaselinesw commented 4 years ago

attached is the NumpyDotNet code that I am using.

I actually just found another bug at this line:

var imgData = np.array(1 - imageData); <---- original.

var imgData = np.array(np.array(1) - imageData); <--- temporary workaround.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 8:04 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Which example are you testing with the first one or the repo I sent you? The output images don't seem identical to what a CPPN produces. The code is almost 1 to 1 except that Numsharp uses both Numsharp(missing tile function ) and numpydotnet . Results from Numpydotnet https://user-images.githubusercontent.com/28968495/76039963-f8bb4680-5f1b-11ea-8b20-98ee3c3e709a.jpg

Results from NumSharp https://user-images.githubusercontent.com/28968495/76039990-0e307080-5f1c-11ea-8cce-10ff37bf2db4.jpg

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWRGVEQ3FRIYFQQD2Y3RGBDXLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7PQ4A#issuecomment-595523696 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWRX6F6UU6PYIJEX34LRGBDXLANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWT63S72JHILTUHBZM3RGBDXLA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7PQ4A.gif

using System; using System.Collections.Generic; using System.Text; using NumpyDotNet;

namespace CSHARPCPPN { public class ArtGenNumpyDotNet { public int BatchSize { get; set; } public int NetSize { get; set; } public int HSize { get; set; } public int Width { get; set; } public int Height { get; set; } public float Scaling { get; set; } public bool RGB { get; set; } public int C_Dim { get; set; } public int Num_Points { get; set; } public ndarray Img_Batch { get; set; } public ndarray Hid_Vec { get; set; } public ndarray X_Dat { get; set; } public ndarray Y_Dat { get; set; } public ndarray R_Dat { get; set; } public ndarray Art_Net { get; private set; }

    public void InitialiseCPPN(int batchSize = 1, int netSize = 32, int hSize = 32, int width = 256, int height = 256, float scaling = 1.0f, bool RGB = false)
    {
        //Setting Parameters

        BatchSize = batchSize;
        NetSize = netSize;
        HSize = hSize;
        Width = width;
        Height = height;
        Scaling = scaling;
        this.RGB = RGB;

        if (RGB)
        {
            C_Dim = 3;
        }
        else
        {
            C_Dim = 1;
        }

        Num_Points = width * height;

        // Configuring Network

        Img_Batch = np.random.standard_normal(new int[] { batchSize, width, height, C_Dim });

        Hid_Vec = np.random.standard_normal(new int[] { batchSize, hSize });

        X_Dat = np.random.standard_normal(batchSize, width * height, 1);
        Y_Dat = np.random.standard_normal(batchSize, width * height, 1);
        R_Dat = np.random.standard_normal(batchSize, width * height, 1);
    }

    public List<ndarray> CreateGrid(int width = 32, int height = 32, float scaling = 1.0f)
    {
        Num_Points = width * height;

        double ret_step = 0;
        ndarray x_range = np.linspace(-1 * scaling, scaling, ref ret_step, width);

        ndarray y_range = np.linspace(-1 * scaling, scaling, ref ret_step, height);

        ndarray x_mat = np.matmul(np.ones(new shape(height, 1)), x_range.reshape(1, width));

        ndarray y_mat = np.matmul(y_range.reshape(height, 1), np.ones(new shape(1, width)));

        ndarray r_mat = np.sqrt((x_mat * x_mat) + (y_mat * y_mat));

        x_mat = np.tile(x_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);
        y_mat = np.tile(y_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);
        r_mat = np.tile(r_mat.flatten(), BatchSize).reshape(BatchSize, Num_Points, 1);

        return new List<ndarray>
        {
            x_mat,
            y_mat,
            r_mat
        };
    }

    public ndarray BuildCPPN(int width, int height, ndarray x_dat, ndarray y_dat, ndarray r_dat, ndarray hid_vec)
    {
        Num_Points = width * height;
        // Scale the hidden vector
        ndarray hid_vec_scaled = np.reshape(hid_vec, new shape(BatchSize, 1, HSize)) * np.ones((Num_Points, 1), dtype: np.Float32) * Scaling;

        //Unwrap the grid matrices

        ndarray x_dat_unwrapped = np.reshape(x_dat, new shape(BatchSize * Num_Points, 1));

        ndarray y_dat_unwrapped = np.reshape(y_dat, new shape(BatchSize * Num_Points, 1));

        ndarray r_dat_unwrapped = np.reshape(r_dat, new shape(BatchSize * Num_Points, 1));

        ndarray h_vec_unwrapped = np.reshape(hid_vec_scaled, new shape(BatchSize * Num_Points, HSize));

        //Build the network
        Art_Net = FullyConnected(h_vec_unwrapped, NetSize) +
            FullyConnected(x_dat_unwrapped, NetSize, false) +
            FullyConnected(y_dat_unwrapped, NetSize, true) +
            FullyConnected(r_dat_unwrapped, NetSize, false);

        //Set Activation function
        var output = TanhSig();

        var model = np.reshape(output, new shape(BatchSize, width, height, C_Dim));
        return model;
    }

    public ndarray TanhSig(int numOfLayers = 2)
    {
        var h = np.tanh(Art_Net);
        for (int i = 0; i < numOfLayers; i++)
        {
            h = np.tanh(FullyConnected(h, NetSize));
        };

        return Sigmoid(FullyConnected(h, C_Dim));
    }

    public ndarray SinTanhSof()
    {
        var h = np.tanh(Art_Net);
        h = 0.95 * np.sin(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        h = SoftPlus(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        return SoftPlus(FullyConnected(h, NetSize));
    }

    public ndarray TanhSigSinSof()
    {
        var h = np.tanh(Art_Net);
        h = 0.8 * np.sin(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        h = SoftPlus(FullyConnected(h, NetSize));
        h = np.tanh(FullyConnected(h, NetSize));
        return Sigmoid(FullyConnected(h, NetSize));
    }

    public ndarray FullyConnected(ndarray input, int out_dim, bool with_bias = true)
    {
        var mat = np.random.standard_normal((int)input.shape.iDims[1], out_dim).astype(np.Float32);

        var result = np.matmul(input, mat);

        if (with_bias)
        {
            var bias = np.random.standard_normal(1, out_dim).astype(np.Float32);
            result += bias * np.ones(new shape(input.shape.iDims[0], 1), np.Float32);
        }

        return result;
    }

    public ndarray Sigmoid(ndarray x)
    {
        return (np.array(1.0) / (1.0 + np.exp(-1 * x))) as ndarray;
    }

    public ndarray SoftPlus(ndarray x)
    {
        return np.log(1.0 + np.exp(x));
    }

    public ndarray Generate(int width = 256, int height = 256, float scaling = 20.0f, ndarray z = null)
    {
        //Generate Random Key to generate image
        var vector = z;
        if (vector == null)
        {
            vector = np.random.uniform(-1, 1, new int[] { BatchSize, HSize }).astype(np.Float32);
        }

        var data = CreateGrid(width, height, scaling);
        return BuildCPPN(width, height, data[0], data[1], data[2], vector);
    }

    public double[] GenerateArt(int batch_size = 1, int net_size = 16, int h_size = 8, int width = 512, int height = 512, float scaling = 10.0f, bool RGB = true, int? seed = null)
    {
        int? KeyId = null;
        if (seed != null)
        {
            KeyId = seed;
            np.random.seed(KeyId);
        }
        else
        {
            KeyId = Math.Abs(DateTime.Now.GetHashCode());
            np.random.seed(KeyId);
        }

        var art = new ArtGenNumpyDotNet();

        art.InitialiseCPPN(batch_size, net_size, RGB: RGB);

        if (RGB)
        {
            C_Dim = 3;
        }
        else
        {
            C_Dim = 1;
        }

        var imageData = art.Generate(width, height, scaling);

        var imgData = np.array(np.array(1) - imageData);
        if (C_Dim > 1)
        {
            imgData = np.array(imgData.reshape((height, width, C_Dim)) * 255.0);
        }
        else
        {
            imgData = np.array(imgData.reshape((height, width)) * 255.0);
        }

        return imgData.ToArray<double>();
    }
}

}

QadiymStewart commented 4 years ago

A bit better but still off . It looks as if NumpyDotNet is producing values above a threshold related to imageData. Still looking into it as we speak but if you look at the picture below every time Irun NumSharp imageData values are all under 1, but NumpyDotNet values are huge image

KevinBaselinesw commented 4 years ago

Is it a random number generation issue?

My random number generator is new and is possibly not generating within expected range. The docs are not great on the numpy site.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 8:54 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

A bit better but still off . It looks as if NumpyDotNet is producing values above a threshold related to imageData. Still looking into it as we speak but if you look at the picture below every time Irun NumSharp imageData values are all under 1, but NumpyDotNet values are huge https://user-images.githubusercontent.com/28968495/76042564-1a6bfc00-5f23-11ea-8dd5-6ba6709de44f.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWVNUUZZTR5GH4FG7PTRGBJSZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7X2GY#issuecomment-595557659 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWW3CFSNH2P6KESDLYTRGBJSZANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWWDO5S5ELQZVQ7GR7DRGBJSZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7X2GY.gif

KevinBaselinesw commented 4 years ago

Again, I am using the EXACT same random numbers for NumSharp and NumpyDotNet testing. I modified the NumSharp code to use my random number generator.

Using this method, I am able to reproduce an EXACT output from the art.GenerateArt function.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 8:54 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

A bit better but still off . It looks as if NumpyDotNet is producing values above a threshold related to imageData. Still looking into it as we speak but if you look at the picture below every time Irun NumSharp imageData values are all under 1, but NumpyDotNet values are huge https://user-images.githubusercontent.com/28968495/76042564-1a6bfc00-5f23-11ea-8dd5-6ba6709de44f.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWVNUUZZTR5GH4FG7PTRGBJSZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7X2GY#issuecomment-595557659 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWW3CFSNH2P6KESDLYTRGBJSZANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWWDO5S5ELQZVQ7GR7DRGBJSZA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7X2GY.gif

QadiymStewart commented 4 years ago

might be still stepping through code to get exact problem

QadiymStewart commented 4 years ago

Getting an error when trying to match Numsharp's code. I know this sigmoid function should clamp the value between 0 and 1. Previous code: public ndarray Sigmoid(ndarray x) { return 1.0 / (1.0 + np.exp(np.array(-1 * x))); }

New Code: public ndarray Sigmoid(ndarray x) { return np.array(1.0) / (1.0 + np.exp(np.array(-1 * x))); } Error: image

KevinBaselinesw commented 4 years ago

Try this: Basically casting

public ndarray Sigmoid(ndarray x)

    {

        return (np.array(1.0) / (1.0 + np.exp(-1 * x))) as ndarray;

    }

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 9:19 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Getting an error when trying to math Numsharp's code. I know this sigmoid function should clamp the value between 0 and 1. Previous code: public ndarray Sigmoid(ndarray x) { return 1.0 / (1.0 + np.exp(np.array(-1 * x))); }

New Code: public ndarray Sigmoid(ndarray x) { return np.array(1.0) / (1.0 + np.exp(np.array(-1 * x))); } Error: https://user-images.githubusercontent.com/28968495/76043804-96b40e80-5f26-11ea-9410-894840df51d6.png

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWV7AN4D4UUUEGN2XVTRGBMRFA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7ZMII#issuecomment-595564065 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWQRWOT7ID44FHC2DQTRGBMRFANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWUII2VN77OJCTEXFODRGBMRFA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN7ZMII.gif

QadiymStewart commented 4 years ago

Alot smoother now but still off. Somewhere isn't generating when i find it I numpy numsh

'll message.

KevinBaselinesw commented 4 years ago

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 9:41 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Alot smoother now but still off. Somewhere isn't generating when i find it I https://user-images.githubusercontent.com/28968495/76045024-0677c880-5f2a-11ea-9c4e-dd6b937238a8.jpg https://user-images.githubusercontent.com/28968495/76045027-07a8f580-5f2a-11ea-914a-e6a43c9fa3c4.jpg

'll message.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWTXT3QIDK6RBJX3Z5DRGBPEVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN72ZLA#issuecomment-595569836 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWRBDFV34MDCNNIC2WTRGBPEVANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWUOEPVFYHONOECMPD3RGBPEVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN72ZLA.gif

KevinBaselinesw commented 4 years ago

I just sent you several screen captures that show the changes I made to the original file you sent me. Hopefully that will get you over the finish line.

From: Qadiym Stewart notifications@github.com Sent: Thursday, March 5, 2020 9:41 PM To: Quansight-Labs/numpy.net numpy.net@noreply.github.com Cc: KevinBaselinesw kmckenna@baselinesw.com; State change state_change@noreply.github.com Subject: Re: [Quansight-Labs/numpy.net] No random functions (#3)

Alot smoother now but still off. Somewhere isn't generating when i find it I https://user-images.githubusercontent.com/28968495/76045024-0677c880-5f2a-11ea-9c4e-dd6b937238a8.jpg https://user-images.githubusercontent.com/28968495/76045027-07a8f580-5f2a-11ea-914a-e6a43c9fa3c4.jpg

'll message.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Quansight-Labs/numpy.net/issues/3?email_source=notifications&email_token=ACP4GWTXT3QIDK6RBJX3Z5DRGBPEVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN72ZLA#issuecomment-595569836 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ACP4GWRBDFV34MDCNNIC2WTRGBPEVANCNFSM4KTW4HOA . https://github.com/notifications/beacon/ACP4GWUOEPVFYHONOECMPD3RGBPEVA5CNFSM4KTW4HOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEN72ZLA.gif

QadiymStewart commented 4 years ago

I don't see any screenshots. You can email them to me qadiym.stewart@live.ca