"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "5bb00c817fcfd8585ca073ce6c2e9420868ea396"
Unverified Commit 12bb853c authored by LiamSwayne's avatar LiamSwayne Committed by GitHub
Browse files

[documentation] grammatical fixes in image_classification.mdx (#24141)

Update image_classification.mdx
parent d0d16329
...@@ -289,7 +289,7 @@ You're ready to start training your model now! Load ViT with [`AutoModelForImage ...@@ -289,7 +289,7 @@ You're ready to start training your model now! Load ViT with [`AutoModelForImage
At this point, only three steps remain: At this point, only three steps remain:
1. Define your training hyperparameters in [`TrainingArguments`]. It is important you don't remove unused columns because this'll drop the `image` column. Without the `image` column, you can't create `pixel_values`. Set `remove_unused_columns=False` to prevent this behavior! The only other required parameter is `output_dir` which specifies where to save your model. You'll push this model to the Hub by setting `push_to_hub=True` (you need to be signed in to Hugging Face to upload your model). At the end of each epoch, the [`Trainer`] will evaluate the accuracy and save the training checkpoint. 1. Define your training hyperparameters in [`TrainingArguments`]. It is important you don't remove unused columns because that'll drop the `image` column. Without the `image` column, you can't create `pixel_values`. Set `remove_unused_columns=False` to prevent this behavior! The only other required parameter is `output_dir` which specifies where to save your model. You'll push this model to the Hub by setting `push_to_hub=True` (you need to be signed in to Hugging Face to upload your model). At the end of each epoch, the [`Trainer`] will evaluate the accuracy and save the training checkpoint.
2. Pass the training arguments to [`Trainer`] along with the model, dataset, tokenizer, data collator, and `compute_metrics` function. 2. Pass the training arguments to [`Trainer`] along with the model, dataset, tokenizer, data collator, and `compute_metrics` function.
3. Call [`~Trainer.train`] to finetune your model. 3. Call [`~Trainer.train`] to finetune your model.
...@@ -343,7 +343,7 @@ If you are unfamiliar with fine-tuning a model with Keras, check out the [basic ...@@ -343,7 +343,7 @@ If you are unfamiliar with fine-tuning a model with Keras, check out the [basic
To fine-tune a model in TensorFlow, follow these steps: To fine-tune a model in TensorFlow, follow these steps:
1. Define the training hyperparameters, and set up an optimizer and a learning rate schedule. 1. Define the training hyperparameters, and set up an optimizer and a learning rate schedule.
2. Instantiate a pre-treined model. 2. Instantiate a pre-trained model.
3. Convert a 🤗 Dataset to a `tf.data.Dataset`. 3. Convert a 🤗 Dataset to a `tf.data.Dataset`.
4. Compile your model. 4. Compile your model.
5. Add callbacks and use the `fit()` method to run the training. 5. Add callbacks and use the `fit()` method to run the training.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment