We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Code:
net = EfficientNet.from_name(model_name='efficientnet-b5',in_channels=1)
Error: TypeError: from_name() got an unexpected keyword argument 'in_channels'
TypeError: from_name() got an unexpected keyword argument 'in_channels'
By reading the source code, I found that from_name() contains the in_channels argument, as follows:
@classmethod def from_name(cls, model_name, in_channels=3, **override_params): """Create an efficientnet model according to name. Args: model_name (str): Name for efficientnet. in_channels (int): Input data's channel number. override_params (other key word params): Params to override model's global_params. Optional key: 'width_coefficient', 'depth_coefficient', 'image_size', 'dropout_rate', 'num_classes', 'batch_norm_momentum', 'batch_norm_epsilon', 'drop_connect_rate', 'depth_divisor', 'min_depth' Returns: An efficientnet model. """ cls._check_model_name_is_valid(model_name) blocks_args, global_params = get_model_params(model_name, override_params) model = cls(blocks_args, global_params) model._change_in_channels(in_channels) return model
But it still raises the above error, I don't know the reason. I look forward to any useful reply.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Code:
net = EfficientNet.from_name(model_name='efficientnet-b5',in_channels=1)
Error:
TypeError: from_name() got an unexpected keyword argument 'in_channels'
By reading the source code, I found that from_name() contains the in_channels argument, as follows:
But it still raises the above error, I don't know the reason.
I look forward to any useful reply.
The text was updated successfully, but these errors were encountered: