Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanYuFi committed Dec 8, 2023
1 parent 715ffc5 commit b22d90c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/python/ml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ml/flax_resnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This training example comes from Flax official github repo:

<https://github.com/google/flax/tree/main/examples/imagenet>

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:

<https://huggingface.co/microsoft/resnet-50>

Expand Down
9 changes: 2 additions & 7 deletions examples/python/ml/flax_resnet/flax_resnet_inference.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
# 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,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# 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

Expand Down

0 comments on commit b22d90c

Please sign in to comment.