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

invalid input type #41

Closed
aminemosbah opened this issue Mar 7, 2022 · 3 comments
Closed

invalid input type #41

aminemosbah opened this issue Mar 7, 2022 · 3 comments

Comments

@aminemosbah
Copy link

Instructions To Reproduce the Bug

  1. What exact command you run:
If making changes to the project itself, please use output of the following command:
git rev-parse HEAD; git diff

<put code or diff here>
  1. Full logs or other relevant observations:
<put logs here>
  1. please simplify the steps as much as possible so they do not require additional resources to run, such as a private dataset.

Expected behavior:

If there are no obvious error in "what you observed" provided above,
please tell us the expected behavior.

Environment:

Provide your environment information using the following command:

git clone https://gist.github.com/tuttelikz/ebd5ab3ffb29cb9399f2596b8f163a4e a && python a/cenv.py
@aminemosbah
Copy link
Author

trying to make an inference

test_sets='/content/Test_image'
test = DataLoader(dataset=test_sets, batch_size=1, drop_last=True)
print(f'model {best_model_path} loaded')
with torch.no_grad():
model_test.eval()
result=model_test('test')

/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py in _conv_forward(self, input, weight, bias)
438 _pair(0), self.dilation, self.groups)
439 return F.conv2d(input, weight, bias, self.stride,
--> 440 self.padding, self.dilation, self.groups)
441
442 def forward(self, input: Tensor) -> Tensor:

TypeError: conv2d() received an invalid combination of arguments - got (str, Parameter, NoneType, tuple, tuple, tuple, int), but expected one of:

  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)
    didn't match because some of the arguments have invalid types: (!str!, !Parameter!, !NoneType!, !tuple!, !tuple!, !tuple!, int)
  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups)
    didn't match because some of the arguments have invalid types: (!str!, !Parameter!, !NoneType!, !tuple!, !tuple!, !tuple!, int)

@yasmineLalabouali
Copy link

yasmineLalabouali commented Jun 23, 2022

@aminemosbah did you solve it please ? I'm having the same issue

@tuttelikz
Copy link
Owner

tuttelikz commented Jun 27, 2022

@yasmineLalabouali, let's try to figure it out. Could you please provide a snippet of code here you are trying farabio for? I need as much details to reproduce.

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

3 participants