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

Need some help. I don't understand some code. #1

Closed
KeyKy opened this issue Jul 15, 2017 · 2 comments
Closed

Need some help. I don't understand some code. #1

KeyKy opened this issue Jul 15, 2017 · 2 comments
Labels

Comments

@KeyKy
Copy link

KeyKy commented Jul 15, 2017

Due to my poor skill of pytorch. I found this code in your encodenet.py

# Conv_1
model += [nn.Conv2d(3, self.inplanes, kernel_size=3, padding=1),
					nn.BatchNorm2d(self.inplanes),
					nn.ReLU(inplace=True)]
# Residual units
for i in range(4):
	model += [self._residual_unit(block, num_planes[i], num_blocks[i],
						strides[i])]
# Last conv layer
# TODO norm layer, instance norm?
model += [nn.BatchNorm2d(self.inplanes),
			nn.ReLU(inplace=True),
			Encoding(D=512*self.expansion,K=16),
			nn.BatchNorm1d(16),
			nn.ReLU(inplace=True),
			nn2.View(-1, 512*self.expansion*16),
			nn.Linear(512*self.expansion*16, num_classes)]
self.model = nn.Sequential(*model)

What's the input of Encoding(D=512*self.expansion,K=16). I found your encode kernel which only accept 2 tensor(A,R) and where are the X, C and A?
Although R = X - C, I don't find the X - C in your model

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

No branches or pull requests

2 participants