Git Product home page Git Product logo

Comments (3)

harsh-99 avatar harsh-99 commented on July 28, 2024

Hi,
May be the names might not be similar however the architecture is same. In case if you feel that there is difference in architecture please pin point where is the difference.
Thanks

from scl.

cizhenshi avatar cizhenshi commented on July 28, 2024

Thanks for your reply!
In [(https://github.com/harsh-99/SCL/blob/master/lib/model/faster_rcnn/vgg16_dfrcnn.py)]

class netD_img(nn.Module):
def init(self, beta=1, ch_in=1024, ch_out=1024, W=38, H=75, stride_1=1, padding_1=1, kernel=3):
super(netD_img, self).init()
self.conv_image = nn.Conv2d(ch_in, ch_out, stride=stride_1, padding=padding_1, kernel_size=kernel)
self.bn_image = nn.BatchNorm2d(ch_out)
self.fc_1_image = nn.Linear(1, 2)
self.ch_out = ch_out
self.relu = nn.ReLU(inplace=True)
self.maxpool = nn.MaxPool2d(kernel_size=2)
self.bn_2 = nn.BatchNorm2d(ch_out)
#self.softmax = nn.Softmax()
#self.logsoftmax = nn.LogSoftmax()

def forward(self, x):
x = self.conv_image(x)
x = self.relu(x)
x = self.bn_image(x)
x = self.maxpool(x)
x = self.bn_2(x)
# convert to 1024WH x 1.
x = flatten(x)
x = torch.transpose(x, 0, 1)
x = self.fc_1_image(x)
# 1 x n vector
#y = self.softmax(x)
#x = self.logsoftmax(x)
#return x, y
return x

I noticed that you used the BN layer and max pool layer, which didn't seem to exist in the original implementation. Are they necessary and why add these layers?

from scl.

harsh-99 avatar harsh-99 commented on July 28, 2024

Hi,
Thanks for pointing out. I checked with my colleague about the same and found that this slight difference is to stabilize the training. However the overall architecture is kept same.
Thanks

from scl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.