Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question about the size of output imgae #20

Open
mshmoon opened this issue Apr 15, 2018 · 1 comment
Open

A question about the size of output imgae #20

mshmoon opened this issue Apr 15, 2018 · 1 comment

Comments

@mshmoon
Copy link

mshmoon commented Apr 15, 2018

The code need input size (256 ,256) ,and output size is (256,256).This limit the ability of the practice.So I want to extend the net ability to arbitrary input size .If I do ,the code need adjustment? I can not understand the code in depth. Please help
def colormap(n):
cmap=np.zeros([n, 3]).astype(np.uint8)

for i in np.arange(n):
    r, g, b = np.zeros(3)

    for j in np.arange(8):
        r = r + (1<<(7-j))*((i&(1<<(3*j))) >> (3*j))
        g = g + (1<<(7-j))*((i&(1<<(3*j+1))) >> (3*j+1))
        b = b + (1<<(7-j))*((i&(1<<(3*j+2))) >> (3*j+2))

    cmap[i,:] = np.array([r, g, b])

return cmap
@bodokaiser
Copy link
Owner

bodokaiser commented Apr 15, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants