From b22d90c777235b69c4bed1a16440d4f46ff5b295 Mon Sep 17 00:00:00 2001 From: DuanYuFi Date: Fri, 8 Dec 2023 07:03:20 +0000 Subject: [PATCH] polish --- examples/python/ml/README.md | 2 +- examples/python/ml/flax_resnet/README.md | 2 +- examples/python/ml/flax_resnet/flax_resnet_inference.py | 9 ++------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/examples/python/ml/README.md b/examples/python/ml/README.md index 0803b009..09636b0b 100644 --- a/examples/python/ml/README.md +++ b/examples/python/ml/README.md @@ -13,7 +13,7 @@ This directory contains examples demonstrating how to use SPU to write privacy-p [Stax](https://jax.readthedocs.io/en/latest/jax.example_libraries.stax.html). * [stax_mnist_classifier](stax_mnist_classifier/): Private training of a simple neural network for MNIST classification with [Stax](https://jax.readthedocs.io/en/latest/jax.example_libraries.stax.html). -* [flax_resnet](flax_resnet/): Private training of a [ResNet](https://arxiv.org/abs/1512.03385) model with [Flax](https://github.com/google/flax) library. +* [flax_resnet](flax_resnet/): Private training of a [ResNet](https://arxiv.org/abs/1512.03385) model with [Flax](https://github.com/google/flax) library, and private inference of a pre-trained ResNet-50 model based on [Microsoft-ResNet50](https://huggingface.co/microsoft/resnet-50). * [flax_gpt2](flax_gpt2/): Private inference of a pre-trained [GPT2](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf) model with [Flax](https://github.com/google/flax) library. diff --git a/examples/python/ml/flax_resnet/README.md b/examples/python/ml/flax_resnet/README.md index 38bfb04b..63d2ed22 100644 --- a/examples/python/ml/flax_resnet/README.md +++ b/examples/python/ml/flax_resnet/README.md @@ -6,7 +6,7 @@ This training example comes from Flax official github repo: -and the inference example comes from microsoft resnet-50 repo on Transformers: +and the inference example comes from pre-trained microsoft resnet-50 model on huggingface: diff --git a/examples/python/ml/flax_resnet/flax_resnet_inference.py b/examples/python/ml/flax_resnet/flax_resnet_inference.py index e1e31794..d7d45d31 100644 --- a/examples/python/ml/flax_resnet/flax_resnet_inference.py +++ b/examples/python/ml/flax_resnet/flax_resnet_inference.py @@ -1,10 +1,10 @@ -# Copyright 2022 The Flax Authors. +# Copyright 2023 Ant Group Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,11 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Flax implementation of ResNet Inference.""" - -# See issue #620. -# pytype: disable=wrong-arg-count - import argparse import json