Preheat oven to 375°F.
Line a baking sheet or platter with paper towels.
Shred the sweet potatoes in a food processor fitted with a grating blade or use the large holes of a box grater. Place in a large mixing bowl.
Shred the onions in a food processor or box grater. Place in a strainer and using your hands, squeeze out excess liquid. Add to the sweet potatoes.
In a small mixing bowl beat together the eggs, 1 teaspoon of salt, and1/2 teaspoon of pepper. Pour into the potato and onion mixture. Add the flour and combine the ingredients thoroughly.
Heat 1/4 cup of oil in a large nonstick skillet over medium-high heat until the oil is shimmering (but not smoking). Working in batches, form patties, about 2 inches in diameter and place them in the skillet. Gently press to flatten with a spatula or wooden spoon. Cook until golden brown, about 3 minutes. Carefully flip and cook on the other side until golden and crisp, about 3 minutes more. Remove to the paper towel lined platter to drain.
Add more oil to the skillet if necessary and repeat with the remaining potato mixture, making sure to stir first if the ingredients have separated.
Arrange the sweet potato pancakes in single layers on rimmed baking sheets lined with parchment paper, place in the oven, and cook until hot and crisp, about 8 minutes.
Arrange the pancakes on a serving platter, season with salt and pepper and serve hot.
(These can be prepared up to 2 days in advance and refrigerated.)