-
Notifications
You must be signed in to change notification settings - Fork 8
add ResNet graph construction and demo code #40
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
base: master
Are you sure you want to change the base?
Conversation
|
Since the demo is loading the pretrained model, shouldn't it be initializing the color mode to 'BGR' |
|
Also I think a lot of the inference_fully_conv functions are identical to the ones in the inference.py, specifically bn and _max_pool. It would be better to simply import these from inference.py than to have duplicate implementations. You can also add a switch to the conv function to alternate between conv and atrous_conv to further reduce duplicate code. |
|
|
|
Ah, I misread that line in models.py. |
|
Yeah i can import |
|
That's fair. Also the only difference between model_fully_conv and model is a few lines pertaining to avg_pooling. It's easier to just add a flag in model.py to simply disable the avg_pool and return an error if get_avg_pool is called. You would also need to add a switch to choose which version of inference to call. |
|
not really. there are more differences because i had to control the number of |
|
Right, but that doesn't affect model.py and model_fully_conv.py. |
|
I don't know if this is bad practice, but you could basically do
in the init function of the class if you had to |
|
Ah i see. That would remove lot of duplication. I will fix it. |
|
Sounds good. Another option is to use some class inheritance if you think these two files will severely diverge in the future but still share a subset of functions. |
|
That's even better! Good call |
-examples/resnet_demo.py
-vis/pretrained_models/resnet