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

About model’s parameter #152

Open
EricPengShuai opened this issue Jul 21, 2021 · 0 comments
Open

About model’s parameter #152

EricPengShuai opened this issue Jul 21, 2021 · 0 comments

Comments

@EricPengShuai
Copy link

why do the model have this two parameter ?

model(get_test_input(inp_dim, CUDA), CUDA)

In addition,why do the get_test_input function imread dog-cycle-car.png although for different test images?

def get_test_input(input_dim, CUDA):
    img = cv2.imread("dog-cycle-car.png")
    img = cv2.resize(img, (input_dim, input_dim)) 
    img_ =  img[:,:,::-1].transpose((2,0,1))
    img_ = img_[np.newaxis,:,:,:]/255.0
    img_ = torch.from_numpy(img_).float()
    img_ = Variable(img_)
    
    if CUDA:
        img_ = img_.cuda()
    num_classes
    return img_
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

1 participant