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

prune_issue #1

Open
yuyijie1995 opened this issue Jan 20, 2021 · 0 comments
Open

prune_issue #1

yuyijie1995 opened this issue Jan 20, 2021 · 0 comments

Comments

@yuyijie1995
Copy link
Owner

class ModuleConnect(object):
def init(self, layer_type, layer_name, batchnorm=None, activation=None,
top=None, bottom=None, top_idx=None, bottom_idx=None):
print('now module connect init!!!')
self.layer_type = layer_type
self.layer_name = layer_name
self.batchnorm = batchnorm
self.activation = activation
self.top = top
self.top_idx = top_idx
self.bottom = bottom
self.bottom_idx = bottom_idx
self.next_mod = []
self.prev_mod=[]

def __repr__(self):#打印一个实例化对象
    print('repr module connect')
    trptd  = '-------------------------------\n'
    trptd += f'layer_type: {self.layer_type}\n'
    trptd += f'layer_name: {self.layer_name}\n'
    trptd += f'batchnorm: {self.batchnorm}\n'
    trptd += f'activation: {self.activation}\n'
    trptd += f'bottom: {self.bottom}({self.bottom_idx})\n'
    trptd += f'top: {self.top}({self.top_idx})\n'
    trptd += '-------------------------------\n'
    return trptd
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